Skip to main content
added 1 character in body
Source Link
marc
  • 2.5k
  • 2
  • 18
  • 25

In the past I came across some tutorials that describe how to achieve a ssh password-less setup, but some are sadly wrong.
Let's start over again, and check every step:

  1. FROM CLIENT - Generate key: ssh-keygen -t rsa
    Public and private key (id_rsa.pub and id_rsa) will be automatically stored in the ~/.ssh/ directory.
    Setup will be easier if you use an empty passphrase. If you are not willing to do that, then still follow this guide, but also check the bullet point below.

  2. FROM CLIENT - Copy public key to server : ssh-copy-id user@server
    Client public key will be copied to server's location ~/.ssh/authorized_keys.

  3. FROM CLIENT - Connect to server: ssh user@server

Now, if it's still not working after the described 3 steps, lets try the following:

  • Check ~/.ssh folder permissions in client and server machine.
  • Check /etc/ssh/sshd_config in the server to ensure that RSAAuthentication, PubkeyAuthentication and UsePAM options aren't disabled, they can be enabled by default with yes.
  • If you entered a passphrase while generating your client key, then you may try ssh-agent & ssh-add to achieve password-less connections in your session.
  • Check the contents of /var/log/auth.log on the server to find the issue why key authentication is skipped at all.

In the past I came across some tutorials that describe how to achieve a ssh password-less setup, but some are sadly wrong.
Let's start over again, and check every step:

  1. FROM CLIENT - Generate key: ssh-keygen -t rsa
    Public and private key (id_rsa.pub and id_rsa) will be automatically stored in the ~/.ssh/ directory.
    Setup will be easier if you use an empty passphrase. If you are not willing to do that, then still follow this guide, but also check the bullet point below.

  2. FROM CLIENT - Copy public key to server : ssh-copy-id user@server
    Client public key will be copied to server's location ~/.ssh/authorized_keys.

  3. FROM CLIENT - Connect to server: ssh user@server

Now, if it's still not working after the described 3 steps, lets try the following:

  • Check ~/ssh folder permissions in client and server machine.
  • Check /etc/ssh/sshd_config in the server to ensure that RSAAuthentication, PubkeyAuthentication and UsePAM options aren't disabled, they can be enabled by default with yes.
  • If you entered a passphrase while generating your client key, then you may try ssh-agent & ssh-add to achieve password-less connections in your session.
  • Check the contents of /var/log/auth.log on the server to find the issue why key authentication is skipped at all.

In the past I came across some tutorials that describe how to achieve a ssh password-less setup, but some are sadly wrong.
Let's start over again, and check every step:

  1. FROM CLIENT - Generate key: ssh-keygen -t rsa
    Public and private key (id_rsa.pub and id_rsa) will be automatically stored in the ~/.ssh/ directory.
    Setup will be easier if you use an empty passphrase. If you are not willing to do that, then still follow this guide, but also check the bullet point below.

  2. FROM CLIENT - Copy public key to server : ssh-copy-id user@server
    Client public key will be copied to server's location ~/.ssh/authorized_keys.

  3. FROM CLIENT - Connect to server: ssh user@server

Now, if it's still not working after the described 3 steps, lets try the following:

  • Check ~/.ssh folder permissions in client and server machine.
  • Check /etc/ssh/sshd_config in the server to ensure that RSAAuthentication, PubkeyAuthentication and UsePAM options aren't disabled, they can be enabled by default with yes.
  • If you entered a passphrase while generating your client key, then you may try ssh-agent & ssh-add to achieve password-less connections in your session.
  • Check the contents of /var/log/auth.log on the server to find the issue why key authentication is skipped at all.
Changed /etc/ssh/ssd_config to /etc/ssh/sshd_config
Source Link

In the past I came across some tutorials that describe how to achieve a ssh password-less setup, but some are sadly wrong.
Let's start over again, and check every step:

  1. FROM CLIENT - Generate key: ssh-keygen -t rsa
    Public and private key (id_rsa.pub and id_rsa) will be automatically stored in the ~/.ssh/ directory.
    Setup will be easier if you use an empty passphrase. If you are not willing to do that, then still follow this guide, but also check the bullet point below.

  2. FROM CLIENT - Copy public key to server : ssh-copy-id user@server
    Client public key will be copied to server's location ~/.ssh/authorized_keys.

  3. FROM CLIENT - Connect to server: ssh user@server

Now, if it's still not working after the described 3 steps, lets try the following:

  • Check ~/ssh folder permissions in client and server machine.
  • Check /etc/ssh/ssd_configsshd_config in the server to ensure that RSAAuthentication, PubkeyAuthentication and UsePAM options aren't disabled, as they arecan be enabled by default with yes.
  • If you entered a passphrase while generating your client key, then you may try ssh-agent & ssh-add to achieve password-less connections in your session.
  • Check the contents of /var/log/auth.log on the server to find the issue why key authentication is skipped at all.

In the past I came across some tutorials that describe how to achieve a ssh password-less setup, but some are sadly wrong.
Let's start over again, and check every step:

  1. FROM CLIENT - Generate key: ssh-keygen -t rsa
    Public and private key (id_rsa.pub and id_rsa) will be automatically stored in the ~/.ssh/ directory.
    Setup will be easier if you use an empty passphrase. If you are not willing to do that, then still follow this guide, but also check the bullet point below.

  2. FROM CLIENT - Copy public key to server : ssh-copy-id user@server
    Client public key will be copied to server's location ~/.ssh/authorized_keys.

  3. FROM CLIENT - Connect to server: ssh user@server

Now, if it's still not working after the described 3 steps, lets try the following:

  • Check ~/ssh folder permissions in client and server machine.
  • Check /etc/ssh/ssd_config in the server to ensure that RSAAuthentication, PubkeyAuthentication and UsePAM options aren't disabled, as they are enabled by default with yes.
  • If you entered a passphrase while generating your client key, then you may try ssh-agent & ssh-add to achieve password-less connections in your session.
  • Check the contents of /var/log/auth.log on the server to find the issue why key authentication is skipped at all.

In the past I came across some tutorials that describe how to achieve a ssh password-less setup, but some are sadly wrong.
Let's start over again, and check every step:

  1. FROM CLIENT - Generate key: ssh-keygen -t rsa
    Public and private key (id_rsa.pub and id_rsa) will be automatically stored in the ~/.ssh/ directory.
    Setup will be easier if you use an empty passphrase. If you are not willing to do that, then still follow this guide, but also check the bullet point below.

  2. FROM CLIENT - Copy public key to server : ssh-copy-id user@server
    Client public key will be copied to server's location ~/.ssh/authorized_keys.

  3. FROM CLIENT - Connect to server: ssh user@server

Now, if it's still not working after the described 3 steps, lets try the following:

  • Check ~/ssh folder permissions in client and server machine.
  • Check /etc/ssh/sshd_config in the server to ensure that RSAAuthentication, PubkeyAuthentication and UsePAM options aren't disabled, they can be enabled by default with yes.
  • If you entered a passphrase while generating your client key, then you may try ssh-agent & ssh-add to achieve password-less connections in your session.
  • Check the contents of /var/log/auth.log on the server to find the issue why key authentication is skipped at all.
Source Link
marc
  • 2.5k
  • 2
  • 18
  • 25

In the past I came across some tutorials that describe how to achieve a ssh password-less setup, but some are sadly wrong.
Let's start over again, and check every step:

  1. FROM CLIENT - Generate key: ssh-keygen -t rsa
    Public and private key (id_rsa.pub and id_rsa) will be automatically stored in the ~/.ssh/ directory.
    Setup will be easier if you use an empty passphrase. If you are not willing to do that, then still follow this guide, but also check the bullet point below.

  2. FROM CLIENT - Copy public key to server : ssh-copy-id user@server
    Client public key will be copied to server's location ~/.ssh/authorized_keys.

  3. FROM CLIENT - Connect to server: ssh user@server

Now, if it's still not working after the described 3 steps, lets try the following:

  • Check ~/ssh folder permissions in client and server machine.
  • Check /etc/ssh/ssd_config in the server to ensure that RSAAuthentication, PubkeyAuthentication and UsePAM options aren't disabled, as they are enabled by default with yes.
  • If you entered a passphrase while generating your client key, then you may try ssh-agent & ssh-add to achieve password-less connections in your session.
  • Check the contents of /var/log/auth.log on the server to find the issue why key authentication is skipped at all.