Can you provide instructions on setting up public-key authentication for the Windows command line clients 3.2.3 and later.
asked Dec 20 '10 at 19:51
SSH KB ♦
You can do the following to set up public key authentication:
Public-key authentication is allowed in the client configuration (ssh2_config) by default. The same user keys can be used with the GUI client . If you have not already generated a user keypair, please see the Key Generation KB item before proceeding.
In SSH Secure Shell 3.2.3 and above all keys in UserKeys folder are offered to the server automatically during public-key authentication, so it is no longer necessary to create the 'identification' file for Windows ssh2.exe client. Note that this affects all command line clients including sftp2.exe and scp2.exe that use ssh2.exe as transport.
To offer only specific keys in public-key authentication to the server, the identification file can be created easily for the command line clients. In the SSH Secure Shell Windows GUI, choose Edit > Settings > User Authentication > Keys and click Configure. This will automatically generate the identification file, which can then be edited to contain only the keys you wish to offer to the server. Note that any existing identification file will be overwritten.
Ensure that public-key authentication is allowed in the server configuration (sshd2_config) and the UserConfigDirectory on the server-side is accessible. Note that other authentication methods might still be required in order to login to the server.
Copy the public key portion (filename.pub) of your user keypair to the server, to your %D/.ssh2 directory.
Unix server $HOME/.ssh2/id_dsa_2048_a.pub
Windows server %PROFILE%/.ssh2/id_dsa_2048_a.pub
Create a file on the server in your %D/.ssh2 directory named 'authorization'. The file should contain the following:
Substitute your public key filename for 'id_dsa_2048_a.pub' if different. If path to the key is not specified it is assumed the key exists in the same directory than the 'authorization' file. If several key pairs are used, list public keys on separate lines:
key pub_key_one.pub key pub_key_two.pub