![SSH 连接不起作用](https://linux22.com/image/1052999/SSH%20%E8%BF%9E%E6%8E%A5%E4%B8%8D%E8%B5%B7%E4%BD%9C%E7%94%A8.png)
我必须连接到这个服务器才能上学。但是它不起作用。我能尝试什么?您看到下面的问题。我是 Linux Ubuntu 的初学者,所以我更喜欢完美描述的订单 :D
luka@luka-Lenovo-Flex-2-14:~$ ssh
"theservername"
The authenticity of host 'theservername' ("IPAdress")' can't be established.
RSA key fingerprint is 6e:3e:60:da:e0:0c:45:42:be:48:cb:ff:a10:a4:4b:98.
Are you sure you want to continue connecting (yes/no)?
Host key verification failed.
答案1
问题在于那边的密钥真实性。服务器端必须有你授权的密钥。我想问他们想要什么真实性方法,但最有可能的是密钥。这是相关文档。
https://help.github.com/articles/generating-ssh-keys/
基本上你打字。
ssh-keygen -t rsa
输出将会像..
Generating public/private rsa key pair.
Enter file in which to save the key (/home/a/.ssh/id_rsa):
Created directory '/home/a/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/a/.ssh/id_rsa.
Your public key has been saved in /home/a/.ssh/id_rsa.pub.
The key fingerprint is:
3e:4f:05:79:3a:9f:96:7c:3b:ad:e9:58:37:bc:37:e4 a@A
然后将密钥文件复制到学校机器。它将是 .ssh 目录中的 .pub 文件。
答案2
好吧,看起来你这里有几个问题。首先,你只是在没有用户名的情况下通过 ssh 进入服务器,这会导致它自动选择“luka”作为用户名。这将使你的命令变成ssh user@server
。当它询问 RSA 密钥的真实性时,输入 yes。此外,请务必联系向你提供服务器详细信息的人,并询问你在服务器上的用户名/密码是什么。