SSH连接远程&虚拟主机

连接命令

# 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
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容