update ssh
This commit is contained in:
parent
2d9deb2824
commit
93045830d9
1 changed files with 29 additions and 1 deletions
|
@ -4,7 +4,9 @@ aliases:
|
||||||
website: https://www.openssh.com/
|
website: https://www.openssh.com/
|
||||||
obj: application
|
obj: application
|
||||||
repo: https://github.com/openssh/openssh-portable
|
repo: https://github.com/openssh/openssh-portable
|
||||||
|
rev: 2024-08-26
|
||||||
---
|
---
|
||||||
|
|
||||||
# SSH
|
# SSH
|
||||||
Secure Shell (SSH) is a cryptographic network protocol for operating network services securely over an unsecured network. Typical applications include remote command-line login and remote command execution, but any network service can be secured with SSH.
|
Secure Shell (SSH) is a cryptographic network protocol for operating network services securely over an unsecured network. Typical applications include remote command-line login and remote command execution, but any network service can be secured with SSH.
|
||||||
|
|
||||||
|
@ -161,4 +163,30 @@ User-based settings (everything here only applies to `user1`):
|
||||||
Match User user1
|
Match User user1
|
||||||
PasswordAuthentication no
|
PasswordAuthentication no
|
||||||
AllowTcpForwarding yes
|
AllowTcpForwarding yes
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### `authorized_keys`
|
||||||
|
The `~/.ssh/authorized_keys` file is used to enable passwordless authentication using SSH keys. You can specify multiple allowed SSH keys one per line. The syntax is:
|
||||||
|
```
|
||||||
|
[options] key_type key [user@host]
|
||||||
|
```
|
||||||
|
|
||||||
|
Example:
|
||||||
|
```
|
||||||
|
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA7V4+1E...
|
||||||
|
```
|
||||||
|
|
||||||
|
Common Options:
|
||||||
|
- `command="command_to_run"`: Restricts the key to only execute a specific command. The SSH session will automatically execute this command upon login, and the user won't get an interactive shell.
|
||||||
|
- `from="hostname_or_ip_address"`: Limits the use of the key to a specific hostname or IP address, or a range of addresses.
|
||||||
|
- `no-port-forwarding`: Disables port forwarding for the key.
|
||||||
|
- `no-agent-forwarding`: Disables SSH agent forwarding for the key.
|
||||||
|
- `no-X11-forwarding`: Disables X11 forwarding for the key.
|
||||||
|
- `no-pty`: Disables the allocation of a pseudo-terminal for the key. This means the user won't get an interactive shell session.
|
||||||
|
- `permitopen="host:port"`: Restricts port forwarding to a specific host and port.
|
||||||
|
- `environment="VAR=value"`: Sets environment variables for the session when the key is used to log in.
|
||||||
|
|
||||||
|
Options are comma-seperated if you want to specify multiple.
|
||||||
|
|
||||||
|
#### `.ssh/rc`
|
||||||
|
The `~/.ssh/rc` file is a script that can be executed automatically whenever an SSH session is established. This can be configured globally with `/etc/ssh/sshrc`.
|
||||||
|
|
Loading…
Reference in a new issue