Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • thanks for your reply! I am having problem with understanding both solutions you proposed. For the first one, suppose I am now on linux machine M and want to log on server B without inputing password every time, I copied the line ~/.ssh/id_rsa.pub on machine M (which has only one line ) and appended at the end of the file ~/.ssh/authorized_keys on server B. But still I am asked to input password when login using: ssh [email protected]. This file of ~/.ssh/id_rsa.pub on machine M is generated when I set up the automatic (password-free) ssh login to the server A on machine M. Commented Dec 7, 2015 at 9:23
  • For the alternative solution you suggested, I tried: ssh -i .ssh/id_rsa [email protected] from the machine M, I can use the password to log in successfully. However, when I do "ssh [email protected]", the prompt for password still jumps out. Commented Dec 7, 2015 at 9:29
  • @wiswit - you should take a look at the logs on serverB - typically if it's not allowing login with keys it might be disabled, or (more likey) there might be permission issues with your authorized_keys file that prevents it from being used. Commented Dec 7, 2015 at 14:51