scp出现ssh port 22: Connection refused 问题解决具体步骤
2017-08-29 20:49
1431 查看
[root(0)@sys11 09:20:29 /home/work/Code_release/bj]# scp ./release.sh root@192.168.161.151:/Users/a2014102/Downloads
ssh: connect to host 192.168.161.151 port 22: Connection refused
lost connection
Solution:
One possible reason is that because the ssh server daemon, or sshd, is not loaded and running on localhost, so any attempt to ssh connect to localhost would fail. I check to see whether ssh and sshd are running by typing the following command:
$ ps aux | grep ssh
# Result: bunch of lines, but none of them is about "sshd", only one line is about "ssh"
Result is, I only see ssh running, but not sshd. So I know ssh server daemon is probably not started yet.
First, I verify that I have installed the package “openssh-server” on my fedora box.
Then I check the status of sshd service:
You may not have OpenSSH completely installed. Type this in terminal:
sudo apt-get install openssh-client
sudo apt-get install openssh-server
Another problem that you could have is that your firewall could be blocking the ssh connection. I use Firewall Configuration to manage my ports and firewall.
to restart it type
sudo /etc/init.d/ssh restart
to stop it type
sudo /etc/init.d/ssh stop
to start it type
sudo /etc/init.d/ssh start
ssh: connect to host 192.168.161.151 port 22: Connection refused
lost connection
Solution:
One possible reason is that because the ssh server daemon, or sshd, is not loaded and running on localhost, so any attempt to ssh connect to localhost would fail. I check to see whether ssh and sshd are running by typing the following command:
$ ps aux | grep ssh
# Result: bunch of lines, but none of them is about "sshd", only one line is about "ssh"
Result is, I only see ssh running, but not sshd. So I know ssh server daemon is probably not started yet.
First, I verify that I have installed the package “openssh-server” on my fedora box.
Then I check the status of sshd service:
You may not have OpenSSH completely installed. Type this in terminal:
sudo apt-get install openssh-client
sudo apt-get install openssh-server
Another problem that you could have is that your firewall could be blocking the ssh connection. I use Firewall Configuration to manage my ports and firewall.
to restart it type
sudo /etc/init.d/ssh restart
to stop it type
sudo /etc/init.d/ssh stop
to start it type
sudo /etc/init.d/ssh start
相关文章推荐
- scp出现ssh port 22: Connection refused 问题解决具体步骤
- Ubuntu 安装配置SSH(ssh: connect to host localhost port 22: Connection refused问题的解决)
- SSH连接GitHub出现 ssh: connect to host github.com port 22: Connection refused解决方法
- 在ubuntu中配置SSH(解决connect to host localhost port 22: Connection refused问题)
- 在ubuntu中配置SSH(解决connect to host localhost port 22: Connection refused问题)
- 在Ubuntu中配置SSH(解决connect to host localhost port 22: Connection refused问题)
- 在ubuntu中配置SSH(解决connect to host localhost port 22: Connection refused问题)
- 在ubuntu中配置SSH(解决connect to host localhost port 22: Connection refused问题)
- Ubuntu 安装配置SSH(ssh: connect to host localhost port 22: Connection refused问题的解决)
- 【解决】ssh: connect to host slave port 22: Connection timed out的问题
- ssh: connect to host localhost port 22: Connection refused 问题
- 出现ssh connect to host localhost port 22 Connection refused问题的解决方法
- ssh: connect to host localhost port 22: Connection refused 问题
- scp 出现错误ssh: connect to host 9.123.159.41 port 22:connection refused的解决办法
- 启动hadoop出现ssh: connect to host master port 22: No route to host 问题解决方案
- 解决connect to host localhost port 22: Connection refused问题
- 防火墙安装ssh: connect to host localhost port 22: Connection refused 问题
- ssh:connect to host localhost port 22: Connection refused解决方法
- ubuntu 14.04下scp传输文件出现ssh: connect to host ***port 22: Connection timed out
- ssh: connect to host localhost port 22: Connection refused : 通过系统日志排查问题