[ssh] update to ed25519

This commit is contained in:
Jesús 2021-04-15 18:31:08 -05:00
parent 1ac6191bc4
commit f85953c060
No known key found for this signature in database
GPG Key ID: F6EE7BC59A315766

View File

@ -2,23 +2,23 @@
### Generate SSH key pair ### Generate SSH key pair
#### Medium security ```console
$ ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_ed25519 -C "john@example.com"
ssh-keygen -b 4096 ```
#### High security
ssh-keygen -b 16384
#### Change private key permissions #### Change private key permissions
chmod 600 ~/.ssh/id_rsa ```console
$ chmod 600 ~/.ssh/id_ed25519
```
### Client usage ### Client usage
To connect to a server, run: To connect to a server, run:
ssh -p port user@server-address ```
$ ssh -p port user@server-address
```
`port` for default is `22` `port` for default is `22`
@ -31,9 +31,9 @@ To connect to a server, run:
The client can be configured to store common options and hosts. All options can be declared globally or restricted to specific hosts. For example: The client can be configured to store common options and hosts. All options can be declared globally or restricted to specific hosts. For example:
``` ```bash
~/.ssh/config nano -w ~/.ssh/config
-------------------------------
# host-specific options # host-specific options
Host myserver Host myserver
HostName ssh.heckyel.ga HostName ssh.heckyel.ga
@ -45,9 +45,13 @@ Host myserver
With such a configuration, the following commands are equivalent With such a configuration, the following commands are equivalent
`ssh -p port user@server-address` ```console
$ ssh -p port user@server-address
```
`ssh myserver` ```console
$ ssh myserver
```
### Server usage ### Server usage
@ -73,4 +77,6 @@ For additional protection, you can prevent users from adding new public keys and
In the server, make the authorized_keys file read-only for the user and deny all other permissions: In the server, make the authorized_keys file read-only for the user and deny all other permissions:
chmod 400 ~/.ssh/authorized_keys ```console
$ chmod 400 ~/.ssh/authorized_keys
```