Friday, 29 April 2016

ssh without passwords

One thing I’ve done quite a few times, but always have to look up how to do it as it’s a “do it once, then forget it” kind of thing.

Here’s how to do it:

  • On the client machine, run ssh-keygen
  • Once the key is created, run ssh-copy-id remoteuser@remotehost
You’ll be asked for the remoteuser password, the key is copied across, and ... that is it. You can now ssh remoteuser@remotehost and never need a password.

No comments:

Post a Comment