8/7/2023 0 Comments Ssh copy id command![]() 1 root root 399 Jun 4 02:45 authorized_keys The permission settings of id_rsa and id_rsa.pub files does not effect the password prompt during ssh login. Try "w" permission on other, you will see the same results. ![]() I tried ssh from "client" to "target", playing with the "w" permission on group of ~/.ssh folder.ĭo note that the same applies when you change the "w" permission of ~/.ssh/authorized_keys file. Then you just need to execute: ssh mynewserver IdentityFile ~/.ssh/id_rsa_for_my_new_server Port 20000 #if custom port is used and not the default 22 Here you can add for example something like this: Host mynewserver On my Mac it is: /Users/my-user-name/.ssh/config and add it to the remote's authorized_keys file in: ~/.ssh/authorized_keysĪnother, in my case better solution was to add a custom host in my local ssh config file. You can observe what the SSH program does when executing the command by adding -v to the command: ssh -v you just grab on your local machine any public key for which the SSH program tries find an identity file / private key for, on a Mac for example: cat ~/.ssh/id_rsa.pub ![]() One solution was to add manually on the remote server an SSH key which the SSH program tried to use. ![]() For any reason (didn't bother myself to find out for which reason actually, as I found a quick fix) when executing the ssh command the program didn't look for the right identity file. In my case it was nothing related to the permissions. As this questions appears among the first search results when googling for this behaviour, I will also add my solution: ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |