scp ssh: connect to host 9.123.159.41 port 22:connection refused的解决办法
不同机器之间的文件拷贝,可以用scp命令
使用时报:ssh:connect to host 192.16.41.121 port 22:connectionrefused
mac 无法ssh localhost,错误提示:bash: /usr/local/bin/ssh_session: Permission denied
1.编辑/etc/ssh/sshd_config文件,注释掉
#ForceCommand /usr/local/bin/ssh_session
2.启动sshd服务:
sudo launchctl load -w /System/Library/LaunchDaemons/ssh.plist
3.停止sshd服务:
sudo launchctl unload -w /System/Library/LaunchDaemons/ssh.plist
4查看是否启动:
sudo launchctl list | grep ssh
如果看到下面的输出表示成功启动了:
--------------
- 0 com.openssh.sshd
5.最后ssh localhost 成功
1.查询并开启服务
在终端输入:sudo ps -e |grep ssh
可以查看ssh服务是否开启,如果是关闭状态,需要运行如下命令
sudo service ssh start
如未安装ssh,执行下一步
2.软件安装:
安装方法为:http://blog.csdn.net/lanonola/article/details/51384914
3.连接
ssh username@hostname(or IP)
第一次容易出现的问题是:由于默认关闭了ssh服务,连接无法建立,此时需要手动输入yes,才能建立连接
4.文件拷贝
使用scp命令
scp file username@anotherhostname(or ip):/home/username/document/file2
scp ssh: connect to host 9.123.159.41 port 22:connection refused的解决办法的更多相关文章
- 阿里云配置通用服务的坑 ssh: connect to host 47.103.101.102 port 22: Connection refused
1.~ wjw$ ssh root@47.103.101.102 ssh: connect to host 47.103.101.102 port 22: Connection refused ssh ...
- ssh: connect to host xxx.xxx.xxx.xxx port 22: Connection refused
工具/原料:Ubuntu 在采用scp在不同机器之间进行文件拷贝时出现标题所示的错误,原因可能是: 1.sshd 未启动 2.sshd 未安装 3.防火墙 4需重新启动ssh 服务 查看sshd进程方 ...
- ssh: connect to host xx.xx.xxx.xxx port 22: Connection refused
执行 ssh root@47.94.142.215 报错 首先要开启ssh 系统偏好设置-共享 选上远程登陆 选上远程管理 检测openssh-server是否安装成功 ,安装成功的如下 ps -e ...
- ssh: connect to host 192.168.11.180 port 22: Connection refused
错误原因: 1.sshd 未安装:sudo apt-get install openssh-server 2.sshd 未启动:sudo net start sshd 3.防火墙:sudo ufw d ...
- ssh: connect to host 120.79.26.164 port 22: Connection timed out报错问题
要是使用阿里云服务器,出现这种错误,一般是端口没有打开.需要在阿里云控制台中设置端口后,即可使用ssh连接.
- ssh : connect to host XXX.XXX.XXX.XXX port : 22 connect refused
初学者 写博客 如有不对之处请多多指教 我是要在俩个主机的俩个虚拟机上 用scp (security copy)进行文件远程复制. 但是 终端 提示 ssh : connect to host XXX ...
- git clone https://github.com/istester/ido.git ,确提示“Failed to connect to 192.168.1.22 port 8080: Connection refused” 的解决办法 。
不知道是否有同学遇到如下的问题: p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo } span.s1 { } git clone ...
- Xshell5连接虚拟机出现连Could not connect to '192.168.47.128' (port 22): Connection failed,解决办法
该日记写于2016年11月28日.在用Xshell5连接ubuntu虚拟OS时一直连接不上.出现这种情况的原因可能很多,有像百度上面说的没有关闭linux的防火墙,没有启动linux的ssh服务.但这 ...
- Could not connect to '192.168.80.145' (port 22): Connection failed的解决办法(远程连不上xshell)
问题状况表现1 这个问题一般是你 的什么配置影响了虚拟机的网卡网关设置!!!. 问题状况表现2 这个问题一般是你 的什么配置影响了虚拟机的网卡网关设置. 解决办法 网上的那些解决方案,我都试过,比如. ...
随机推荐
- SQL Server DATEDIFF() 函数(SQL计算时间差)
select * from task_list where 1=1 and datediff(dd,carateTime,getdate()) =0 定义和用法 DATED ...
- 使用git pull文件时和本地文件冲突怎么办
在使用git pull代码时,经常会碰到有冲突的情况,提示如下信息:error: Your local changes to 'c/environ.c' would be overwritten by ...
- Matlab 7.1安装及打不开问题解决
一.安装方法 1.解压[MATLAB.V7.1.Windows版本号].MATLAB.V7.1.R14.SP3.CD1.iso,双击setup进行安装,输入username,单位,找到crac ...
- Dropdown.js基于jQuery开发的轻量级下拉框插件
Dropdown.js 前言 在SPA(Single Page Application)盛行的时代,jQuery插件的轮子正在减少,由于我厂有需求而开发了这个插件.如果觉得本文对您有帮助,请给个赞,以 ...
- 解决SVN CONNOT VERIFY LOCK ON PATH NO MATCHING LOCK-TOKEN AVAILABLE
最近使用SVN,开发项目的时候,璞玉遇到一个问题.就是: connot verify lock on path no matching lock-token available connot v ...
- 如何让xcode自动检查内存泄露
在project-setting中找到 “Run Static Analyzer” 键,然后把值修改为“YES”.这样在编码的时候,xcode就可以自动为我们检查内存泄露了. 原图片:http://b ...
- 【python】python彻底卸载的方法【windows安装版卸载的示例】
要想彻底干净的卸载python,如果是使用的安装版的话,其实很简单.[windows安装版] 就是点击安装包. 例如,当前你安装的版本是3.6.5,你想要把它卸载掉. 查看python版本的命令: 只 ...
- C#实现缩放字体
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; usin ...
- Linux网络之设备接口层:发送数据包流程dev_queue_xmit
转自:http://blog.csdn.net/wdscq1234/article/details/51926808 写在前面 本文主要是分析kernel-3.8的源代码,主要集中在Network的n ...
- sql --- where concat
// where cancat 函数 SELECT * from users WHERE email != CONCAT(username, '', '@huan1234qiu.com');