zoukankan      html  css  js  c++  java
  • scp出现ssh port 22: Connection refused 问题解决具体步骤

    [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:

    1. $ ps aux | grep ssh  

    2. # 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:

    1. sudo apt-get install openssh-client  

    2. 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

    1. sudo /etc/init.d/ssh restart  

    to stop it type

    1. sudo /etc/init.d/ssh stop  

    to start it type

      1. sudo /etc/init.d/ssh start  

  • 相关阅读:
    51Nod 1085 背包问题 (01背包)
    Hdu2602 Bone Collector (01背包)
    Hdu1241 Oil Deposits (DFS)
    问题 1462: [蓝桥杯][基础练习VIP]Huffuman树
    结果填空:最强团队
    算法提高 排列数 (全排列)
    和 (DFS)
    洛谷P1605 迷宫 (DFS)
    Poj1979 Red and Black (DFS)
    Poj2386 Lake Counting (DFS)
  • 原文地址:https://www.cnblogs.com/exmyth/p/7450214.html
Copyright © 2011-2022 走看看