无法使用 ssh 连接到远程主机

无法使用 ssh 连接到远程主机

我最近在我的系统中安装了 Fedora。但我在从远程计算机 ssh 登录时遇到一些问题。

我可以登录该系统,但每次都要求我使用该系统中的 GUI 登录。因此,如果我重新启动该系统,那么在重新启动后,我将无法登录,直到我进入该系统并在 GUI 登录中输入密码。

在这里,我注意到系统连接复选框在我的系统中被禁用。那么为什么这个选项在我的系统中被禁用呢?

在此输入图像描述

任何帮助和建议将不胜感激。

编辑1:

1)是的 sshd 在两个系统中都运行

2) 这是 `ssh -v login@machine' 命令的输出

[root@localhost src]# ssh -v [email protected]
OpenSSH_5.6p1, OpenSSL 1.0.0j-fips 10 May 2012
debug1: Reading configuration data /root/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to 192.168.1.100 [192.168.1.100] port 22.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: identity file /root/.ssh/id_rsa type -1
debug1: identity file /root/.ssh/id_rsa-cert type -1
debug1: identity file /root/.ssh/id_dsa type -1
debug1: identity file /root/.ssh/id_dsa-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.6
debug1: match: OpenSSH_5.6 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.6
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host '192.168.1.100' is known and matches the RSA host key.
debug1: Found key in /root/.ssh/known_hosts:23
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: Next authentication method: publickey
debug1: Trying private key: /root/.ssh/id_rsa
debug1: Trying private key: /root/.ssh/id_dsa
debug1: Next authentication method: password
[email protected]'s password: 
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
Permission denied, please try again.

答案1

你需要设置ssh公钥认证如果您不想一直输入密码。

作为旁注,你应该绝不使用 root 作为您的个人帐户。这是一种可怕的做法,迟早会咬你一口。如果您尝试以 root 身份登录,那么大多数 sshd sane 配置将不允许这样做。这是正确的行为。

答案2

您是否尝试过使用其他用户而不是 root 用户?在最新的 Fedora 中,对 root 有限制。您可以从以下位置更改它:/etc/ssh/ssh_config

相关内容