Once SSH key is generated, use the following steps.
1. Copy public key to remote server
```bash
ssh-copy-id -i <public key location> user@host
```
2. Verify if key-based auth works:
```
ssh -i <private key location> user@host
```
>[!note]
> While attempting to push SSH key to remote server, ensure the files are following the schema:
>
> ```
> PRIVATE KEY - file_name
> PUBLIC KEY - key_name.pub
> ```
Files must follow the rule above, otherwise you'll get the message as follows:
```
% ssh-copy-id -i mfr.pub user@host
/usr/bin/ssh-copy-id: ERROR: failed to open ID file './mfr': No such file or directory
(to install the contents of 'mfr.pub' anyway, look at the -f option)
```
In the example above, files were called: `mfr.prv` and `mfr.pub`.
### See Also
- [[Generating SSH keys for authentication]]