Problem
I would like to use RSA Authentication when logging in from one SCO Unix server to another. How can I do this?
Solution
Lets assume the account you want to log in to is called johnb and that the servers are called sysa and sysb, where sysa is the client and sysb is the server that you want to login to (i.e. the johnb account resides on sysb).
Login to sysa and generate the RSA public and private keys using the command:
# ssh-keygen -t rsaThis will create the directory ./.ssh with the files:
id_rsa (the private key)
id_rsa.pub (the public key)- If you already have RSA Public and Private keys then replace the content of the files created above with your existing keys.
Login to sysb as the user johnb and create the .ssh directory using:
mkdir $HOME/.ssh
chmod 700 $HOME/.sshUsing your favourite editor, create the file$HOME/.ssh/authorized_keysand paste the contents of$HOME/.ssh/id_rsa.pubfrom sysa into this file.- If you inadvertently add carriage returns when pasting the contents into the authorized_keys file then the authentication will fail.
Login to johnb from sysa using:# ssh johnb@sysbor if the account on sysa you are logging in from is also called johnb you can also use:
# ssh sysbIf all is working correctly you will be prompted with:
Enter passphrase for key '/.ssh/id_rsa':This is the passphrase that you used when you created the key using ssh-keygen(1) above.
If you are not prompted for the passphrase then you can use
ssh -v johnb@sysato attempt to debug why ssh(1) is not authenticating using RSA.
See also
TA116826, "How do I set up a remote shell with SSH so that I'm not prompted for a password each time I login using ssh?"