一、配置SSH环境
先在windows下生成ssh的key,再把它复制到Linux服务器的~/.ssh/authorized_keys里面
也可以在windows的.ssh文件夹下创建一个config,这样就可以直接ssh server-qt
别名登录
Host server-qt
HostName xxx.xxx.xxx.xxx
Port xxxx
User qt
IdentityFile C:\Users\ch122\.ssh\id_rsa
PreferredAuthentications publickey
ControlMaster auto
ControlPath /tmp/%r@%h:%p
ControlPersist 1h
linux服务器里需要配置sshd
windows也需要安装sshd
安装OpenSSH服务器
Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0