linux-command/command/ssh.md

54 lines
1.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

ssh
===
openssh套件中的客户端连接工具
## 补充说明
**ssh命令** 是openssh套件中的客户端连接工具可以给予ssh加密协议实现安全的远程登录服务器。
### 语法
```
ssh(选项)(参数)
```
### 选项
```
-1强制使用ssh协议版本1
-2强制使用ssh协议版本2
-4强制使用IPv4地址
-6强制使用IPv6地址
-A开启认证代理连接转发功能
-a关闭认证代理连接转发功能
-b使用本机指定地址作为对应连接的源ip地址
-C请求压缩所有数据
-F指定ssh指令的配置文件
-f后台执行ssh指令
-g允许远程主机连接主机的转发端口
-i指定身份文件
-l指定连接远程服务器登录用户名
-N不执行远程指令
-o指定配置选项
-p指定远程服务器上的端口
-q静默模式
-X开启X11转发功能
-x关闭X11转发功能
-y开启信任X11转发功能。
```
### 参数
* 远程主机指定要连接的远程ssh服务器
* 指令要在远程ssh服务器上执行的指令。
### 实例
```
# ssh 用户名@远程服务器地址
ssh user1@172.24.210.101
```
<!-- Linux命令行搜索引擎https://jaywcjlove.github.io/linux-command/ -->