Operating System - HP-UX
1834742 Members
2817 Online
110070 Solutions
New Discussion

Generating key for a user

 
SOLVED
Go to solution
brian_31
Super Advisor

Generating key for a user

There is a request to generate a ssh key for a user for testing failover on MCSG. Can someone help how to do this? The request is on the failover box.

Thanks

Brian
2 REPLIES 2
IT_2007
Honored Contributor

Re: Generating key for a user

login as root on the primary node and copy authorized-hosts file foor the user from .ssh directory to failover node.

or

/usr/bin/ssh-keygen

and copy to primary and alternate node.
Mel Burslan
Honored Contributor
Solution

Re: Generating key for a user

log into the server as root, on which you need to create the key
su - specific_username
/opt/ssh/bin/ssh-keygen -t dsa

when you are asked to enter passphrase, enter it (twice) if you want it to be used for authentication. If no password access is requested hit enter twice without any other keys for blank passphrase.

log out of specific_username

now you will have 2 files under ~specific_username/.shh named

id_dsa
id_dsa.pub

copy id_dsa.pub to the other node, under the same user's .ssh directory

login to the other node

su - specific_username
cat id_dsa.pub >> authorized_keys

then test it.
________________________________
UNIX because I majored in cryptology...