How to configure basic SSH for RHEL 6.5

Document ID : KB000033263
Last Modified Date : 14/02/2018
Show Technical Document Details


This will provide example on how to setup SSH for the Unix V2 connector


This configuration guide is based off of the root user.


Go to : cd ~


Execute : ls -la


Go to : cd .ssh  (if this folder does not exist then perform the following code: mkdir .ssh)


Execute : ssh -keygen -t rsa

Enter file in which to save the key: Left default

Enter pass-phrase: Either blank or enter a password.


Execute ssh-copy-id root@hostname


Execute : ls -la

Confirm that you have a authorized_keys file


Should you not execute the following: mv .ssh/authorized_keys


Execute chmod 644 authorized_keys

NOTE: If you grant more permissions than 644 authentication will fail.


execute cd ..

You should now be in the home directory (cd ~)

Execute ls -la


The permissions for .ssh should not exceed 755

Execute chmod 755 .ssh


execute chmod go-w ~/


Once complete we will confirm we can log in.


Example ssh root@hostname


Note: if everything is done right it should ask you for your passphrase if you configured one. If you didn't you should log straight in.