美文网首页
SSH连接远程&虚拟主机

SSH连接远程&虚拟主机

作者: JXeddy | 来源:发表于2018-01-02 00:20 被阅读0次

连接命令

# ssh -ip //ssh name@remoteserver 指定用户名登陆

Return:
Success -连接成功

The authenticity of host '10.211.55.5 (10.211.55.5)' can't be established.
ECDSA key fingerprint is SHA256:oq+l/zPYgJqVpv0iYTT8r40WfSU6YNmbVKAUOpe//Bk.
Are you sure you want to continue connecting (yes/no)?
yes

Return:

Warning: Permanently added '10.211.55.5' (ECDSA) to the list of known hosts.
eddy@10.211.55.5's password:
Welcome to Ubuntu 16.04.3 LTS (GNU/Linux 4.10.0-28-generic x86_64)

* Documentation:  https://help.ubuntu.com
* Management:     https://landscape.canonical.com
* Support:        https://ubuntu.com/advantage

277 packages can be updated.
143 updates are security updates.


The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.

error-1 :
Linux下的SSH服务未开启
开启命令如下

# service sshd start

error-2 :

ssh: connect to host 10.211.55.5 port 22: Connection refused 

Ubuntu默认并没有安装ssh服务

Ubuntu系统上测试

ssh localhost 

Return:
Success -已安装

The authenticity of host 'localhost (127.0.0.1)' can't be established.
ECDSA key fingerprint is SHA256:oq+l/zPYgJqVpv0iYTT8r40WfSU6YNmbVKAUOpe//Bk.
Are you sure you want to continue connecting (yes/no)?

Error -系统未安装ssh

ssh: connect to host localhost port 22: Connection refused

如果通过ssh链接Ubuntu,需要自己手动安装openssh-server。如下命令进行

sudo apt-get install openssh-server

Return:

Reading package lists... Done
、、、
Processing triggers for ufw (0.35-0ubuntu2) ...

Test

# ps -e | grep ssh

Return :
Success -已开启

29777 ?        00:00:00 sshd

error-1 -已安装,未启动

ssh-agent

相关文章

网友评论

      本文标题:SSH连接远程&虚拟主机

      本文链接:https://www.haomeiwen.com/subject/hcpxnxtx.html