MobaXterm and the Preferred Authentications.

 Some months ago a co-worker suggested this application as it is very practical and saves you time if you need to setup a X server on Windows (like Xming), transfer files, etc.

Everything was working fine until the last version that came available (I think it was probably version 21.1 or the next after that). when it started to request the password three times if you try to connect using ssh to a host running with Solaris.

My first theory was that the ssh package was upgraded on all the hosts as OS upgrade was done but that was not happening with other applications like "putty.exe", so that was discarded.

Then considered that by mistake I applied a change to the MobaXterm settings but nothing was different and even applying changes the original issue was present.

After a lot of research one of the suggestions (sorry, lost the page and I hope to find it again to give the credits) worked for me, so here are the steps:

 

1.- Inside your "moba home" create ~/.bashrc (if that file doesn't exists)
and add this line:
/bin/cp -p /etc/my_ssh_config /etc/ssh_config

2.- Edit /etc/ssh_config and comment the following line:
#PreferredAuthentications hostbased,publickey,password,keyboard-interactive
 

Now copy and paste the same line but change the order of the "Preferred Authentications" leaving "keyboard-interactive" as your first option:

PreferredAuthentications keyboard-interactive,hostbased,publickey,password


3.- Copy your ssh config file to a new file
/bin/cp -p /etc/ssh_config /etc/my_ssh_config


4.- Try to connect again to the Solaris host, you should be fine now :) 




// Cookie consent