Cannot ssh to localhost [closed]

2020-05-29 16:13发布

I am trying to see if ssh is properly configured on Ubuntu 11.04:

  ashish@ubuntu:~$ ssh localhost
  ssh: connect to host localhost port 22: Connection refused
  ashish@ubuntu:~$

What do I do from here?

标签: ubuntu
3条回答
不美不萌又怎样
2楼-- · 2020-05-29 16:41

Bonus if you need to start the X server you run this:

 ssh -x <host>
查看更多
【Aperson】
3楼-- · 2020-05-29 16:43

Make sure the SSHD is running, looks like it is not.

Try

service sshd start

I am not familiar with ubuntu, but this should work.

查看更多
放荡不羁爱自由
4楼-- · 2020-05-29 16:50

Try:

sudo apt-get install openssh-server

It's most likely that the ssh server is not installed as only the client is installed by default.

查看更多
登录 后发表回答