How To Set Up Passwordless SSH On A Second Computer

Hello,

I successfully set up passwordless login from one of my machines. I have been using it for quite some time. Now I would like to set up passwordless login from a second machine. So I set PubkeyAuthentication to "no" in sshd_config in Ubuntu so I could successfully copy over the pub key to my new machine. That doesn't seem to be working at all. I can't even login from the second machine.

Anyone have any advice? I've tried googling this to death already.

Thank you in advance.

2 Replies

Setting "PubkeyAuthentication" off doesn't enable any other kind of authentication. You're likely going to need to log in from Lish now and re-enable that, since it sounds like you've turned off all authentication methods:

https://library.linode.com/using-lish-the-linode-shell

Once you've enabled PubkeyAuthentication again, you want to put the public key from the other system in the same authorized_keys file you put the first public key in. You can get the public key there however you'd like: it isn't secret, you can throw it in a pastebin or copy it via the first system, etc.

  • Les

Thank you for your help on this and for helping me understand a little bit more about the public/private key thing.

For anyone else with a mac who has similar issue.. i figured out I could copy my keys to my second mac machine using Airdrop. Worked like a charm.

Move SSH Keys From One Computer to Another

http://osxdaily.com/2012/07/13/move-ssh … o-another/">http://osxdaily.com/2012/07/13/move-ssh-keys-from-one-computer-to-another/

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct