AKKUSH
asked Nov 24 2017
Answer
"First of all Login with your preferred to lead for accessing the password less login user on the system,
Generate the ssh key by using the 'ssh-keygen"",
Then open a file of ""~/.ssh/id_rsa.pub"", where you can see the ssh key for current login user,
Then you can copy the key and paste into the ""authorized_keys"" on remote system"
linuxhelp
asked Jan 07 2019
Can i create a private ssh key for a user from another user
Hi all ,
I am new for linux.
I have a locked user " abc" . I am creating a password less ssh key (id_rsa) for " abc" user with root login:
ssh-keygen -q -N " " -t rsa -b 2048 -f /path/to/users/abc/id_rsa -C " abc@$(hostname)"
the generated file is working fine and i am able to login wihtout passwod in putty.
Now i need to create same ssh file for " abc" BUT from another non root user " xyz" with same command.
I have given permission of /path/to/users/abc/.ssh directory to " xyz" :
ssh-keygen -q -N " " -t rsa -b 2048 -f /path/to/users/abc/id_rsa -C " abc@$(hostname)"
Above command executes and create /path/to/users/abc/id_rsa file successfully but when i am try to use this id_rsa on my windows machine with putty, its asking for password and failed.
Please help.