您好我试图ssh到localhost但它显示连接拒绝错误
$ sudo addgroup hadoop
$ sudo adduser --ingroup hadoop hduser
user@ubuntu:~$ su - hduser
hduser@ubuntu:~$ ssh-keygen -t rsa -P ""
Generating public/private rsa key pair.
Enter file in which to save the key (/home/hduser/.ssh/id_rsa):
Created directory '/home/hduser/.ssh'.
Your identification has been saved in /home/hduser/.ssh/id_rsa.
Your public key has been saved in /home/hduser/.ssh/id_rsa.pub.
The key fingerprint is:
9b:82:ea:58:b4:e0:35:d7:ff:19:66:a6:ef:ae:0e:d2 hduser@ubuntu
The key's randomart image is:
[...snipp...]
hduser@ubuntu:~$ cat $HOME/.ssh/id_rsa.pub >> $HOME/.ssh/authorized_keys
hduser@ubuntu:~$ ssh localhost
ssh:connect to host localhost port 22: Connection refused
最后一行显示错误,我不知道我做错了什么。我使用VMware并使用它运行ubuntu。
答案 0 :(得分:0)
**** ****解决
所有我必须安装openssh服务器,它的工作原理