Find out what happens after copying a public key to the remote server, as well as manually adding keys to the /.ssh/authorizedkeys file. 307300 EIU - Information Usability EIU - Computational Sci & Engr. Connect to the remote server and use the ssh -copy-id command: ssh -copy-ide remoteusername serveripaddress 2. To enable passwordless access, you need to upload a copy of the public key to the remote server.
and add it to the remote's authorized_keys file in: ~/.ssh/authorized_keysĪnother, in my case even better solution, was to add a custom host in my local ssh config file. Learn how to use the ssh-copy-id command to securely add your SSH key to a remote host. Option 1: Upload Public Key Using the ssh -copy-id Command. You will be asked to provide a password of.
You can observe what the SSH program does when executing the ssh command by adding -v to it: ssh -v you just grab on your local machine any public key of which the SSH program tries out the private key, for example (on a Mac/Linux) the default key: cat ~/.ssh/id_rsa.pub The simple and easiest way to copy your public key to the remote server is to use a ssh-copy-id command utility. In my case this same error occurred when the SSH program tried to use a different identity file than defined when using ssh-copy-id or couldn't just find the defined private key / identity file. As Camilo already suggested, you can add the right SSH public key manually on the remote server.