WinSCP连接到Ubuntu。拒绝访问
我在基于Windows 7的VMware(VMware®Workstation 7.1.6)中安装了Ubuntu13_desktop。 现在我想从Windows 7连接到Ubuntu。 将WMware设置为主机只有。 安装的WinSCP在Windows,配置WinSCP连接到Ubuntu。拒绝访问
protocol: SFTP;
Host name: ubuntu;
Port: 22;
UserName: oracle;
Password: ***.
被点击登录,这表明
Searching for host...
Connection to host...
Authenticating...
Using username "oracle"
Authenticating with pre-entered password.
Access denied.
Access denied.
我能成功通过CMD执行ping Ubuntu Linux系统。
任何人都可以帮助我通过WinSCP访问Ubuntu吗?提前致谢。
那么端口22是用于SSH服务。所以,你也许可以尝试通过键入
sudo apt-get install openssh-server
在你的Ubuntu安装OpenSSH服务器,然后尝试用以下详细信息连接:
协议:SSH
主机名:[IP的地址计算机]
端口:22
用户名:[用户名]
密码:[密码]
希望这应该工作。
你好,谢谢你的建议。我做了'sudo apt-get install openssh-server'。但它仍然没有意义。现在,我在安装Windows的FileZilla,它提示'状态:\t连接到10.112.20.229 ... 响应:\t fzSftp开始 命令:\t开放 “[email protected]” 22 错误:\t网络错误:连接被拒绝 错误:\t无法连接到服务器# – CLoren
问题变得更加严重。通过WinSCP,它会提示'服务器拒绝SFTP连接,但它会监听FTP连接。 你想使用FTP协议而不是SFTP?更喜欢使用加密。“# – CLoren
作为参考,上面的问题在这里被问到:[服务器拒绝SFTP连接,但它侦听FTP连接](http://stackoverflow.com/questions/20965425/the-server-rejected- sftp-connection-but-it-listen-ftp-connections) –
首先看看系统上的auth.log
。
cat /var/log/auth.log
在我的情况与WinSCP赋予,我发现这样的事情:
fatal: no matching mac found: client hmac-sha1,hmac-sha1-96,hmac-md5 server hmac-sha2-512,hmac-sha2-256,hmac-ripemd160 [preauth]
与评论的/etc/ssh/sshd_config
行:
MACs hmac-sha2-512,hmac-sha2-256,hmac-ripemd160
不要忘记重启SSH: - ) 希望这可以帮助一些人。
谢谢你,这个解决方法对我很有帮助,但是如果有人可以在这个安全性问题上做出反应, – Assil
如果sshd(openssh-server)已安装且正在运行,但在使用WinSCP时仍无法访问。在Ubuntu 16。X看看AUTH日志:
sudo cat /var/log/auth.log
我发现这一点:
No supported authentication methods available [preauth]
问题是Ubuntu的sshd的配置默认为公钥/私钥身份验证的远程ssh访问:
RSAAuthentication yes
PubkeyAuthentication yes
PasswordAuthentication no
如果您想跳过kay对工作,请打开sshd conf文件:
sudo nano /etc/ssh/sshd_config
查找上述属性,并修改:
RSAAuthentication no
PubkeyAuthentication no
PasswordAuthentication yes
重新启动ssh:
sudo systemctl restart sshd
如果您已经设置了在Ubuntu 16.x实例的用户,您现在应该能够用ssh或带有用户名/密码的WinSCP。请注意,系统的安全性现在面临更大的风险。
这对于计算器而言是无关紧要的。它属于超级用户。 –
对不起?你介意告诉为什么它是脱离主题吗? – CLoren
是的,我试图从Windows机器连接到Ubuntu机器。 – CLoren