scp 出现 ssh : connect to host localhost port 22:Connection refused

来源:互联网 发布:linux新建目录权限命令 编辑:程序博客网 时间:2024/06/07 03:33

使用scp命令在 Ubuntu 两台主机之间传输数据的时候可能会出现
ssh : connect to host localhost port 22:Connection refused
的错误,这可能是由于ssh-server没有安装或是启动.

ps -A | grep sshd

来检查ssh-server是否运行


使用命令:

/etc/init.d/ssh -start

来启动ssh服务


如果没有安装可以用命令:

sudo apt-get install openssh-server

来安装ssh-server.

0 0
原创粉丝点击