概述
由于Windows的Powershell集成了SSH功能,所以不需要你手动安装
密码登录
命令:ssh 用户名@主机
示例:ssh root@192.168.1.101
如果本地用户名与远程用户名一致,登录时可以省略用户名。
示例:ssh 192.168.1.101
其他功能:ssh -p 端口 用户名@主机
密钥对登录
首先更改私钥权限
chmod 400 私钥路径
示例:chmod 400 ~/.ssh/key.pem
示例:chmod 400 C:\ssh\key.pem
常用的连接命令:
ssh -i 私钥 用户名@主机
示例:ssh -i C:\awa\awa.pem user@1.2.3.4
其他功能:
ssh -i 私钥 -o 端口 用户名@主机
Comment here is closed