0

I have been searching most of the morning and haven't found a way to remove passphrase from the ssh login to my audio/video server. Most everything I have found is about a different type of authentication. My client machine only has .ssh/known-hosts and the server has .ssh/authorized_keys and another know-hosts. I am in and out of the server constantly and it is not connected to the internet and I don't really need a password on this machine. Is there some way to remove the password from the ssh login? Thanks

1
  • known-hosts is not a way of authentication. You have to find the key which is used for authentication. It is obvious from verbose log (ssh -vvv your_server). If you will not make it on your own, then post the log here. The passphrase removal from the key is described many times.
    – Jakuje
    Jan 16, 2016 at 21:21

2 Answers 2

2

If you want to completely remove the password, you can do it:

  1. Run passwd -d username to remove the password.
  2. Edit /etc/ssh/sshd_config and set PermitEmptyPasswords yes.

If you want some protection and use only one computer, you can use ssh keys:

# How to generate and use your default key:
ssh-keygen
ssh-copy-id user@host
ssh user@host

# How to generate and use another named key:
ssh-keygen -f another_key_file
ssh-copy-id another_key_file user@host
ssh -i another_key_file user@host
  1. You can leave the key without password, if you wish. This is probably not the best choice for your default key, but for another named key used only for this it doesn't matter so much.

  2. You can use ssh-agent or keychain, so that you need to enter the passphrase only once after each reboot and your key stays loaded.

0

From debian-administration.org:

SSH usually comes with an utility called ssh-copy-id that simply adds the contents of client’s ~/.ssh/id_rsa.pub to the server’s ~/.ssh/authorized_keys

$ ssh-copy-id -i .ssh/id_rsa.pub user@remote

If you don't have a key (and don't have ~/.ssh/id_rsa and ~/.ssh/id_rsa.pub), generate one using ssh-keygen

Replace .ssh/id_rsa.pub with your desired key if you wish not to use the default

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .