scp出现ssh port 22: Connection refused 问题解决具体步骤

[root(0)@sys11 09:20:29 /home/work/Code_release/bj]# scp ./release.sh  [email protected]:/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

以下是主要的关键步骤:

OpenSSH server on Mac OS X

OpenSSH server is part of Mac OS X and you don‘t need to install any additional package.

To enable the OpenSSH server of Mac OS X, open System Preferences:

Click on sharing and enable Remote Login:

This will start up OpenSSH server automatically.

直接关掉就保存了,因为mac是时时保存的。

scp出现ssh port 22: Connection refused 问题解决具体步骤,布布扣,bubuko.com

时间: 2024-08-25 20:12:34

scp出现ssh port 22: Connection refused 问题解决具体步骤的相关文章

[故障解决]Ssh连接port 22: Connection refused

金山云有一个服务器需要连接到数据库但是总是失败,检查之后发现它的VPC配错了,更改VPC之后,这台服务器也会更换一个新的内网IP地址,但是问题来了,更换了内网IP之后,从跳板机连接,提示port 22: Connection refused. #ssh -v 新的ip地址,发现根本没有到Connection established.直接就提示port 22: Connection refused.这基本可以断定不是跳板机的问题了,那么就需要在远程机器里看配置. 但是远程机器是无法连接的啊,怎么办

ssh: connect to host localhost port 22: Connection refused (2)

命令:ssh localhost 错误信息:ssh: connect to host localhost port 22: Connection refused 错误原因: 1.sshd 未安装 2.sshd 未启动 3.防火墙 解决方法: 1.确定安装sshd:  sudo apt-get install openssh-server 2.启动sshd: net start sshd 3.检查防火墙设置 检验方法: 输入命令:ssh localhost 若成功,则表示安装成功,且连接通过: 转

Ubuntu下 ssh : connect to host localhost port 22:Connection refused

Ubuntu下测试ssh时使用ssh localhost 命令,出现错误提示connect to host localhost port 22:Connection refused 造成这个错误的原因可能是ssh-server未安装或者未启动.ubuntu 11.10 默认安装openssh-client,但是木有安装server 运行 ps -e | grep ssh,查看是否有sshd进程 如果没有,说明server没启动,通过 /etc/init.d/ssh -start 启动server

ssh: connect to host github.com port 22: Connection refused

假设git例如,下面的问题时,远程推送: [[email protected] learngit]$ git push -u origin master ssh: connect to host github.com port 22: Connection refused fatal: Could not read from remote repository. Please make sure you have the correct access rights and the reposit

ubuntu安装配置ssh-connect to host localhost port 22: Connection refused

在安装ssh,经常出现 ssh: connect to host localhost port 22: Connection refused 从以下几点去检查: 1.是否安装ssh-server: 打开"终端窗口",输入"sudo ps -e |grep ssh"-->回车-->有sshd,说明ssh服务已经启动,如果没有启动,输入"sudo service ssh start"-->回车-->ssh服务就会启动.若无ss

Linux--ssh: connect to host localhost port 22: Connection refused

今日在进行SSH免密码登陆的时候,使用SSH进行测试,抛出下面异常 ssh: connect to host localhost port 22: Connection refused 在网上收了下,答复很多,基本都是 1.没启动SSH 2.没安装SSH 3.没关防火墙 4.-. ,千篇一律. 上面的解决方案我都看了,但是还是不好使. 调研了些关于SSH的资料,内容如下, SSH:是一种安全通道协议,主要用来实现字符界面的远程登录,远程复制等功能(使用TCP的22号端口).SSH协议对通信双方的

mac connect to host localhost port 22: Connection refused

在Mac OS X 10.10.5学习hadoop的过程中,输入命令ssh localhost得到 ssh: connect to host localhost port 22: Connection refused 解决方法是选择系统偏好设置->选择共享->点击远程登录 然后再输入命令ssh localhost发现已经解决问题 找到解决方案来自于 http://stackoverflow.com/questions/6313929/how-do-i-open-port-22-in-os-x-

hadoop启动start-all.sh出错(master: ssh: connect to host master port 22: Connection refused)

当我们打开系统输入hadoop启动命令start-all.sh时出现以下错误: [[email protected] ~]# start-all.sh starting namenode, logging to /usr/local/hadoop/libexec/../logs/hadoop-root-namenode-master.out master: ssh: connect to host master port 22: Network is unreachable master: ss

CentOS系统中出现错误--SSH:connect to host centos-py port 22: Connection refused

我在第一次搭建自己的 hadoop2.2.0单节点的伪分布集成环境时遇到了此错误,通过思考问题和查找解决方案最终搞定了这个问题,其错误原因主要有以下几种: 1)SSH服务为安装 此时,采用在线安装的方式就行下载安装,命令为:yum -y install openssh-server:然后启动ssh服务:service sshd start. 2)ssh服务对应22号端口未开启 首先使用命令:ss -lnt查询22号端口是否开启,如下图所示为正常开启,否则要开启22号端口. 如果要修改端口,查看或