This has been talked about before, and a lot of old timers know this already.
How do I login to a remote Linux system without needing to type in my password every time?
Obviously you need two computers to do this. Your local computer and the remote computer.
You will need an account on both computers as well. You will need to know the password of the account on the remote
computer as well. The account doesn't have to match the same username as the account on the local computer.
First, make sure you have a local public ssh key. I do this like this.
ssh-keygen -t ecdsa -b 384
This will give some output to your screen, and you'll see a little square, something like a QR code.
It will ask for something called a "passphrase". Don't enter anything here, just press "enter".
In fact I recommend using the defaults for all the questions.
Now there are lots of articles about what kind of encryption key to use. RSA or DSA or Elliptical DSA or others.
The -t is the "type" of key. rsa or dsa or ecdsa for example. The -b is the "bits" used to encrypt the key.
Common values for rsa and dsa are 1024, 2048, and 4096. I've never used higher, but it's probably possible.
Common values for elliptical keys are 256, 384 and 512. Less bits may seem less secure, but elliptical keys
use a "curving" algorithm, so they are very secure.
Most current distro's include a utility called "ssh-copy-id". It's pretty simple to use.
From your local system...
ssh-copy-id myusername@theremotecomputer for example...
ssh-id-copy [email protected]
The first time you do this, it will ask for your password.
Now log back out, and login again.
ssh [email protected]
viola' - no password needed.
How do I login to a remote Linux system without needing to type in my password every time?
Obviously you need two computers to do this. Your local computer and the remote computer.
You will need an account on both computers as well. You will need to know the password of the account on the remote
computer as well. The account doesn't have to match the same username as the account on the local computer.
First, make sure you have a local public ssh key. I do this like this.
ssh-keygen -t ecdsa -b 384
This will give some output to your screen, and you'll see a little square, something like a QR code.
It will ask for something called a "passphrase". Don't enter anything here, just press "enter".
In fact I recommend using the defaults for all the questions.
Now there are lots of articles about what kind of encryption key to use. RSA or DSA or Elliptical DSA or others.
The -t is the "type" of key. rsa or dsa or ecdsa for example. The -b is the "bits" used to encrypt the key.
Common values for rsa and dsa are 1024, 2048, and 4096. I've never used higher, but it's probably possible.
Common values for elliptical keys are 256, 384 and 512. Less bits may seem less secure, but elliptical keys
use a "curving" algorithm, so they are very secure.
Most current distro's include a utility called "ssh-copy-id". It's pretty simple to use.
From your local system...
ssh-copy-id myusername@theremotecomputer for example...
ssh-id-copy [email protected]
The first time you do this, it will ask for your password.
Now log back out, and login again.
ssh [email protected]
viola' - no password needed.
Last edited: