[ssh] update to ed25519
This commit is contained in:
parent
1ac6191bc4
commit
f85953c060
@ -2,23 +2,23 @@
|
||||
|
||||
### Generate SSH key pair
|
||||
|
||||
#### Medium security
|
||||
|
||||
ssh-keygen -b 4096
|
||||
|
||||
#### High security
|
||||
|
||||
ssh-keygen -b 16384
|
||||
```console
|
||||
$ ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_ed25519 -C "john@example.com"
|
||||
```
|
||||
|
||||
#### Change private key permissions
|
||||
|
||||
chmod 600 ~/.ssh/id_rsa
|
||||
```console
|
||||
$ chmod 600 ~/.ssh/id_ed25519
|
||||
```
|
||||
|
||||
### Client usage
|
||||
|
||||
To connect to a server, run:
|
||||
|
||||
ssh -p port user@server-address
|
||||
```
|
||||
$ ssh -p port user@server-address
|
||||
```
|
||||
|
||||
`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:
|
||||
|
||||
```
|
||||
~/.ssh/config
|
||||
|
||||
```bash
|
||||
nano -w ~/.ssh/config
|
||||
-------------------------------
|
||||
# host-specific options
|
||||
Host myserver
|
||||
HostName ssh.heckyel.ga
|
||||
@ -45,9 +45,13 @@ Host myserver
|
||||
|
||||
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
|
||||
|
||||
@ -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:
|
||||
|
||||
chmod 400 ~/.ssh/authorized_keys
|
||||
```console
|
||||
$ chmod 400 ~/.ssh/authorized_keys
|
||||
```
|
||||
|
Loading…
x
Reference in New Issue
Block a user