Force SSH to use RSA1 authentication when RSA2 is available


X-Win32 8.1 and later supports key based user authentication with SSH. By default SSH assumes that the key is a Protocol 2 key if both Protocols 1 and 2 are available on your Unix machine. Using an RSA 1 key will therefore cause the authentication to fail. Note that if Protocol 1 is the only protocol available there are no problems using the RSA 1 key.

If you must use an RSA1 key to connect to a computer which supports both Protocols 1 and 2, there is a hidden feature in X-Win32 which lets you do this.

Create an SSH session in X-Config adding your private key file in the advanced tab

Locate the .xw32 file which stores your session. The name of the .xw32 file will be similar to the session name in X-Config.

Open up the SSH session you wish to force to use RSA1 keys in notepad.

The session will look something like this


<Session>
   <
Module>ssh</Module>
   <
Name>MySessionName</Name>
   <
NewInstance>never</NewInstance>
   <
Settings>
      <
Command>/usr/X11R6/bin/xterm</Command>
      <
Host>computername.starnet.com</Host>
      <
LogLevel>debug3</LogLevel>
      <
Login>xdemo</Login>
      <
Password>****a very long line of alphanumeric text****</Password>
   </
Settings>
   <
Uuid value="{**a hex keycode**}" />
   <
WindowMode>default</WindowMode>
</
Session>

Under the < Settings > tag add the following line:


<ForceProtocol1>true</ForceProtocol1>

Save the file and relaunch your session.