本人的IDE是PHPstorm 2018.3
解决办法
1. Deployment > Options, 去掉勾选"Hash hosts in known_hosts file"
设置 "Add new host key to known_host" 为 "ask"
2. 重新设置密码 File->Settings -> Appearance & Behavior -> System Settings -> Passwords
3. 服务器上编辑/etc/ssh/sshd_config
UseDNS no #指定sshd是否应该对远程主机名进行方向解析,以检查此主机名是否与其IP地址真实对应。默认值为"yes"。
GSSAPIAuthentication no #解决Linux之间使用SSH远程连接慢的问题
4. 重启sshd服务并重新尝试sftp连接
博主使用PHPstorm 2018.3,分享解决ssh和sftp连接问题的办法。包括在Deployment选项中去掉特定勾选、设置询问主机密钥选项,重新设置密码,在服务器编辑sshd_config文件,最后重启sshd服务并重新尝试sftp连接。
397

被折叠的 条评论
为什么被折叠?



