first part of access rights

This commit is contained in:
Florz 2021-02-18 22:39:38 +01:00
parent 4c46efff33
commit b10a0824c1
1 changed files with 7 additions and 1 deletions

View File

@ -38,4 +38,10 @@ and `ls -lsha ~ssh-port-forwarding/.ssh/` should look like this:
4,0K drwx------ 2 ssh-port-forwarding nogroup 4,0K 18. Feb 22:18 .
4,0K drwxr-xr-x 3 ssh-port-forwarding nogroup 4,0K 18. Feb 22:18 ..
0 -rw-r--r-- 1 ssh-port-forwarding nogroup 0 18. Feb 22:18 authorized_keys
```
```
### Configuring access rights
This is all done in `/home/ssh-port-forwarding/.ssh/authorized_keys`.
First use the `ssh-keygen` command to create a private and public key pair on the client side. Don't type any password! Then use `cat ~/.ssh/id_rsa.pub` to display the content of your newly created public key. After that add a new line in the `authorized_keys` file on the server. Use the following line as an example. Your key starts at `AAAA...` and this all needs to be in a single line per key.
`restrict,command="",port-forwarding,permitlisten="localhost:22",permitopen="localhost:22" ssh-rsa AAAA...`