# Setting up Public Key Auth SSH & Allow root

configuration file

```bash
nano /etc/ssh/sshd_config
```

change

```bash
#AuthorizedKeysFile      .ssh/authorized_keys .ssh/authorized_keys2

#TO

AuthorizedKeysFile      .ssh/authorized_keys .ssh/authorized_keys2
```

allow root remote

```bash
#PermitRootLogin prohibit-password
# TO
PermitRootLogin yes
```

restart `ssh`

```bash
systemctl restart ssh
```
