当前位置: 技术问答>linux和unix
百度了一大圈还是解决不了:SSH localhost Permission denied, please try again.
来源: 互联网 发布时间:2017-05-17
本文导语: root@ubuntu-virtual-machine:~# ssh localhost root@localhost's password: Permission denied, please try again. root@localhost's password: root@ubuntu-virtual-machine:~# ssh -v ubuntu@192.168.100.111 OpenSSH_5.9p1 Debian-5ubuntu1.4, OpenSSL 1.0.1 14 Mar 2012 debug1: Reading co...
root@ubuntu-virtual-machine:~# ssh localhost
root@localhost's password:
Permission denied, please try again.
root@localhost's password:
root@ubuntu-virtual-machine:~# ssh -v ubuntu@192.168.100.111
OpenSSH_5.9p1 Debian-5ubuntu1.4, OpenSSL 1.0.1 14 Mar 2012
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to 192.168.100.111 [192.168.100.111] port 22.
debug1: connect to address 192.168.100.111 port 22: Connection refused
ssh: connect to host 192.168.100.111 port 22: Connection refused
root@ubuntu-virtual-machine:~#
事情经过是这样的:
在vm上装的ubuntu进行hadoop开发,由于权限问题运行程序老是提示权限不足
我就在用户的配置文件中把ubuntu用户一行中的的两个1000改成两个0
然后重启在localhost ssh的时候就发生了上面的错误
百度了一大圈,发现都是让改sshd_conf文件中的一些选项的No给位yes(Linux不太熟,那些选项我记不清了)
但是我发现我都陪着文件中这些选项都是原本就都是yes
|
噢,我应该把话说全,要么直接以root账号运行。
要么赋予普通用户使用sudo su的权限。可能有两种做法:
1. 修改/etc/sudoers,这个具体百度吧,我记不清了
2. 把普通用户加入wheel组。在/etc/group里wheel那一行添加