1826123 Members
4591 Online
109690 Solutions
New Discussion

configuring ssh key

 
SOLVED
Go to solution
Shivkumar
Super Advisor

configuring ssh key

Hi,

Does anyone has step by step instructions on how to configure ssh keys etc ?

Thanks,
Shiv
5 REPLIES 5
Mel Burslan
Honored Contributor
Solution

Re: configuring ssh key

if you are the root user and want to create a public/private keypair for a non-root account, first you need to su into that username then create the keypair.

su - username

if [ -d .ssh ]
then
echo ".ssh dir exists"
else
mkdir ~/.ssh
fi

/opt/ssh/bin/ssh-keygen -b 1024 -t dsa -N "pass phrase of your choice" ... (see man page for all other options)

at this point, you should have two files under ~/.ssh, which are

id_dsa
id_dsa.pub

copy the id_dsa.pub to the remote node where you want to login to, into the username's home directory. Make sure the remote user have at least read rights on that file

go to the remote node and login as remote node's user name


cat ~/id_dsa.pub >> ~/.ssh/authorized_keys

you should be good to go, provided you do not have wide open permissions fo your .ssh directory or private key file.

private key on the first host where you created the key pair and authorized_keys file on the remote host should be no more open than 640 permissions and the .ssh directory on either side should be open to no one but the owner, i.e., permissions 700 at best.

Hope this helps
________________________________
UNIX because I majored in cryptology...
Steven E. Protter
Exalted Contributor

Re: configuring ssh key

Shalom Shiv,

http://www.hpuxconsulting.com/5004.ppt

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Rajeev  Shukla
Honored Contributor

Re: configuring ssh key

Hi Shiv,

Have a look at this FAQ http://docs.hp.com/en/6073/FAQ-SSH.pdf
And http://www.openssh.com/manual.html which gives you the details of all files in ssh
Senthil Prabu.S_1
Trusted Contributor

Re: configuring ssh key

Hi Shiva,
Check the attached file for detailed description about SSH key generation.


HTH,
Prabu.S
One man's "magic" is another man's engineering. "Supernatural" is a null word.
Shivkumar
Super Advisor

Re: configuring ssh key

SEP,

Thanks for sending in an excellent presentation. I apologize as i gave you 7 point. It deserved 10 point full which i realized later.

Regards,
Shiv