当前时区为 UTC + 8 小时



发表新帖 回复这个主题  [ 5 篇帖子 ] 
作者 内容
1 楼 
 文章标题 : ssh怎么登陆不上
帖子发表于 : 2015-09-21 19:15 

注册: 2015-09-06 15:34
帖子: 4
系统: windows
送出感谢: 1
接收感谢: 0 次
附件:
QQ截图20150921190918.png
QQ截图20150921190918.png [ 9.27 KiB | 被浏览 792 次 ]


页首
 用户资料  
 
2 楼 
 文章标题 : Re: ssh怎么登陆不上
帖子发表于 : 2015-09-21 19:22 
头像

注册: 2011-03-20 13:12
帖子: 4519
地址: 山东省寿光县
系统: Debian
送出感谢: 105
接收感谢: 997
你是在 root shell 中操作,而 Ubuntu 的 sshd 默认禁止 root 登录。建议回到普通用户的 shell 中登录。或者在 root shell 中 ssh user@localhost

启用 root 登录:
1. 设置root密码:sudo passwd root
2. 编辑 /etc/ssh/sshd_config,增加一行 PermitRootLogin yes

注意 不建议 root 登录 ssh


_________________
Debian 中文论坛 - forums.debiancn.org
欢迎所有 Debian GNU/Linux 用户


最后由 vickycq 编辑于 2015-09-21 19:26,总共编辑了 2 次


_________________
评价: 3.7% sohardtof
 
页首
 用户资料  
 
3 楼 
 文章标题 : Re: ssh怎么登陆不上
帖子发表于 : 2015-09-21 19:24 

注册: 2009-08-04 16:33
帖子: 16882
送出感谢: 21
接收感谢: 1825
http://askubuntu.com/questions/308107/c ... -localhost
Cant SSH localhost


页首
 用户资料  
 
4 楼 
 文章标题 : Re: ssh怎么登陆不上
帖子发表于 : 2015-09-24 14:05 

注册: 2009-08-04 16:33
帖子: 16882
送出感谢: 21
接收感谢: 1825
引用:
yyxy@itcast0:~$ ssh -vvv yyxy@localhost
OpenSSH_6.7p1 Ubuntu-5ubuntu1.3, OpenSSL 1.0.1f 6 Jan 2014
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to localhost [127.0.0.1] port 22.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file /home/yyxy/.ssh/id_rsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/yyxy/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/yyxy/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/yyxy/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/yyxy/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/yyxy/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/yyxy/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/yyxy/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.7p1 Ubuntu-5ubuntu1.3
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.7p1 Ubuntu-5ubuntu1.3
debug1: match: OpenSSH_6.7p1 Ubuntu-5ubuntu1.3 pat OpenSSH* compat 0x04000000
debug2: fd 3 setting O_NONBLOCK
debug3: load_hostkeys: loading entries for host "localhost" from file "/home/yyxy/.ssh/known_hosts"
debug3: load_hostkeys: found key type ECDSA in file /home/yyxy/.ssh/known_hosts:3
debug3: load_hostkeys: loaded 1 keys
debug3: order_hostkeyalgs: prefer hostkeyalgs: ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug2: kex_parse_kexinit: curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ssh-dss-cert-v01@openssh.com,ssh-rsa-cert-v00@openssh.com,ssh-dss-cert-v00@openssh.com,ssh-ed25519,ssh-rsa,ssh-dss
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
debug2: kex_parse_kexinit: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1,hmac-md5-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1,hmac-md5-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib
debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserved 0
debug2: kex_parse_kexinit: curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1
debug2: kex_parse_kexinit: ssh-rsa,ssh-dss,ecdsa-sha2-nistp256,ssh-ed25519
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com
debug2: kex_parse_kexinit: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: kex_parse_kexinit: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: kex_parse_kexinit: none,zlib@openssh.com
debug2: kex_parse_kexinit: none,zlib@openssh.com
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserved 0
debug2: mac_setup: setup umac-64-etm@openssh.com
debug1: kex: server->client aes128-ctr umac-64-etm@openssh.com none
debug2: mac_setup: setup umac-64-etm@openssh.com
debug1: kex: client->server aes128-ctr umac-64-etm@openssh.com none
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ECDSA 5a:53:38:eb:6c:1f:be:15:a3:c5:f8:0c:dc:54:68:34
debug3: load_hostkeys: loading entries for host "localhost" from file "/home/yyxy/.ssh/known_hosts"
debug3: load_hostkeys: found key type ECDSA in file /home/yyxy/.ssh/known_hosts:3
debug3: load_hostkeys: loaded 1 keys
debug1: Host 'localhost' is known and matches the ECDSA host key.
debug1: Found key in /home/yyxy/.ssh/known_hosts:3
debug2: kex_derive_keys
debug2: set_newkeys: mode 1
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug2: set_newkeys: mode 0
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug2: key: /home/yyxy/.ssh/id_rsa ((nil)),
debug2: key: /home/yyxy/.ssh/id_dsa ((nil)),
debug2: key: /home/yyxy/.ssh/id_ecdsa ((nil)),
debug2: key: /home/yyxy/.ssh/id_ed25519 ((nil)),
debug1: Authentications that can continue: publickey,password
debug3: start over, passed a different list publickey,password
debug3: preferred gssapi-keyex,gssapi-with-mic,publickey,keyboard-interactive,password
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Trying private key: /home/yyxy/.ssh/id_rsa
debug3: no such identity: /home/yyxy/.ssh/id_rsa: No such file or directory
debug1: Trying private key: /home/yyxy/.ssh/id_dsa
debug3: no such identity: /home/yyxy/.ssh/id_dsa: No such file or directory
debug1: Trying private key: /home/yyxy/.ssh/id_ecdsa
debug3: no such identity: /home/yyxy/.ssh/id_ecdsa: No such file or directory
debug1: Trying private key: /home/yyxy/.ssh/id_ed25519
debug3: no such identity: /home/yyxy/.ssh/id_ed25519: No such file or directory
debug2: we did not send a packet, disable method
debug3: authmethod_lookup password
debug3: remaining preferred: ,password
debug3: authmethod_is_enabled password
debug1: Next authentication method: password
yyxy@localhost's password:
debug2: we sent a password packet, wait for reply
debug1: Authentications that can continue: publickey,password
Permission denied, please try again.
yyxy@localhost's password:
(我是最近想学习Hadoop,然后配置Hadoop之后启动不了,发现是ssh的问题,所以现在在弄这个,Linux方面很多不熟悉,麻烦你了,谢谢~)

1. Permission denied
權限不符要求
引用:
yyxy@itcast0:~$ ssh -vvv yyxy@localhost

2. 你是以 yyxx 非 root 帳號登入
引用:
debug1: identity file /home/yyxy/.ssh/id_rsa

3. 權限問題
3-1. 詳細參閱 重新檢視過程
https://help.ubuntu.com/community/SSH
特別注意
在一些地方 需要加 sudo
在一些地方 不可以加 sudo
有些地方 設定 700 / 600 權限

4. 還有問題 歡迎再貼文


页首
 用户资料  
 
5 楼 
 文章标题 : Re: ssh怎么登陆不上
帖子发表于 : 2015-09-24 16:31 
头像

注册: 2011-03-20 13:12
帖子: 4519
地址: 山东省寿光县
系统: Debian
送出感谢: 105
接收感谢: 997
引用:
我用主机连接虚拟机Ubuntu也连不起,我用的securecrt和filezilla连都说password错误

若是虚拟机,问题可能出在虚拟机的网络配置上


_________________
Debian 中文论坛 - forums.debiancn.org
欢迎所有 Debian GNU/Linux 用户


页首
 用户资料  
 
显示帖子 :  排序  
发表新帖 回复这个主题  [ 5 篇帖子 ] 

当前时区为 UTC + 8 小时


在线用户

正在浏览此版面的用户:没有注册用户 和 1 位游客


不能 在这个版面发表主题
不能 在这个版面回复主题
不能 在这个版面编辑帖子
不能 在这个版面删除帖子
不能 在这个版面提交附件

前往 :  
本站点为公益性站点,用于推广开源自由软件,由 DiaHosting VPSBudgetVM VPS 提供服务。
我们认为:软件应可免费取得,软件工具在各种语言环境下皆可使用,且不会有任何功能上的差异;
人们应有定制和修改软件的自由,且方式不受限制,只要他们自认为合适。

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
简体中文语系由 王笑宇 翻译