til/ssh/using_a_public_key_to_login.md

14 lines
379 B
Markdown
Raw Permalink Normal View History

2021-05-14 16:17:54 +02:00
You can generate authentication keys and use it with ssh to login. First run the below command if you don't have any (it won't overwrite if you already have one):
```bash
2021-05-14 16:17:54 +02:00
ssh-keygen
```
Then copy your public key to remote server with this:
```bash
2021-05-14 16:17:54 +02:00
ssh-copy-id name@host
```
From now on, you should be able to login with `ssh name@host` without having to enter your password.