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?
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?
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
.