使用 ssh 时的权限问题

使用 ssh 时的权限问题

我在两台计算机之间连接时遇到了一些问题ssh。我们称它们为台式机和笔记本电脑。两台计算机都运行 Ubuntu 16.04,全新安装并应用了所有更新。安装时,我安装了 ssh 和 openssh。以下是安装的 ssh 包:

$ apt list --installed | grep ssh

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

libssh-4/xenial,now 0.6.3-4.3 amd64 [installed]
libssh-gcrypt-4/xenial,now 0.6.3-4.3 amd64 [installed,automatic]
libssh2-1/xenial,now 1.5.0-2 amd64 [installed,automatic]
openssh-client/xenial-updates,xenial-security,now 1:7.2p2-4ubuntu2.1 amd64 [installed]
openssh-server/xenial-updates,xenial-security,now 1:7.2p2-4ubuntu2.1 amd64 [installed,automatic]
openssh-sftp-server/xenial-updates,xenial-security,now 1:7.2p2-4ubuntu2.1 amd64 [installed,automatic]
ssh/xenial-updates,xenial-updates,xenial-security,xenial-security,now 1:7.2p2-4ubuntu2.1 all [installed]
ssh-askpass-gnome/xenial-updates,xenial-security,now 1:7.2p2-4ubuntu2.1 amd64 [installed]
ssh-import-id/xenial,xenial,now 5.5-0ubuntu1 all [installed,automatic]

我可以使用从台式机连接到笔记本电脑,没有任何问题。但是,在笔记本电脑上使用镜像命令不起作用。也就是说:不起作用,因为在我输入正确的密码后它总是返回以下内容:Desktop$ ssh -X [email protected]Laptop$ ssh -X [email protected]

权限被拒绝,请重试。

我坐在两者旁边,可以直接登录而没有任何问题,但不能从笔记本电脑远程登录到台式机(那个方向)。

这可能与文件夹或文件权限有关,而不是与密码问题有关,但我尝试了很多方法都没有成功(例如,删除两个系统上的 .ssh 文件夹,重新安装所有与 ssh 相关的软件包,以及其他一些软件包)。

以下是输出的最后部分

$ssh -X [email protected]

[BUNCH OF OUTPUT REMOVED]

[email protected]'s password: 
debug3: send packet: type 50
debug2: we sent a password packet, wait for reply
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey,password
Permission denied, please try again.
[email protected]'s password: 

有人可以帮忙吗?

相关内容