Friday, May 3, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 758  / 2 Years ago, fri, november 11, 2022, 4:22:43

i have generated rsa key and add it to server's ~/.ssh/authored_keys.



why i nedd password when i ssh server?



my local name is A and server name is B(a root user).do i need create a user named A?


More From » ssh

 Answers
2

Although the question is not entirely clear, I suspect that the answer is that you've authorised the key for the wrong user.



When you say you added the key to ~/.ssh/authorized_keys that means the key is valid only to log in for that user (whichever it may have been). So, if you were logged in as userA that means that key will be used only if you try and log in as userA again, but won't be used if you try and log in as userB.



By default ssh will log you in as the remote user with the same name as your local user. So, if you're logged in to the local system as userA, ssh will try to log you in to the remote system as userA. If you need to log in as userB you can use ssh [email protected] rather than ssh my.server.net.


[#33576] Saturday, November 12, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
socelebrate

Total Points: 274
Total Questions: 123
Total Answers: 124

Location: Saint Helena
Member since Mon, Jan 16, 2023
1 Year ago
;