> For the complete documentation index, see [llms.txt](https://book.linuxsec.org/server/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://book.linuxsec.org/server/misc/passwordless-ssh.md).

# Passwordless SSH

Login SSH dengan SSH key

Generate public and private key

```
ssh-keygen -t rsa -b 4096 -C "asuka@nerv"
```

Copy SSH key to server

```
ssh-copy-id asuka@labs.linuxsec.org -p 666
```

Generate SSH public key using existing private key.

```
ssh-keygen -y -f ssh-keygen -y -f ~/.ssh/id_rsa_asuka | \
tee ~/.ssh/id_rsa_asuka.pub
```

### Reference

* [Login SSH Tanpa Password Menggunakan SSH Key](https://www.linuxsec.org/2019/10/login-ssh-tanpa-password.html)
