OpenSSH(Open Secure Shell)是一个用于安全远程登录和其他网络服务的开源工具套件。
从 Windows 10 版本 1809 和 Windows Server 2019 开始,Windows 系统正式支持 OpenSSH 客户端和服务器功能。
1、把key.pem
密钥文件 复制到 ~/.ssh/
~/.ssh = C:\Users\用户\.ssh
2、打开~/.ssh/
新建 config
文件(无后缀), 内容:
Host server HostName 192.168.1.99 Port 22 User root IdentityFile ~/.ssh/key.pem
3、打开 CMD终端 连接,ssh Host
或者 ssh HostName
都可以
例如:
ssh server
ssh 192.168.1.99
第一次连接会提示,输入 yes
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])?