位置: 编程技术 - 正文

Linux服务器端SSH远程连接速度慢的解决方法(Linux服务器端口状态)

编辑:rootadmin

推荐整理分享Linux服务器端SSH远程连接速度慢的解决方法(Linux服务器端口状态),希望有所帮助,仅作参考,欢迎阅读内容。

文章相关热门搜索词:Linux服务器端口查询,Linux服务器端口查询,Linux服务器端口,Linux服务器端口查询,Linux服务器端口查看,Linux服务器端口,Linux服务器端口被占用怎么解决,Linux服务器端口怎么开放,内容如对您有帮助,希望把文章链接给更多的朋友!

解决方法:

1、在ssh服务端上更改/etc/ssh/sshd_config文件中的配置为如下内容:

复制代码代码如下:UseDNS no # GSSAPI options GSSAPIAuthentication no

然后,执行/etc/init.d/sshd restart重启sshd进程使上述配置生效,在连接一般就不慢了。

2、如果还慢的话,检查ssh服务端上/etc/hosts文件中,.0.0.1对应的主机名是否和 uname -n的结果一样,或者把本机ip和hostname(uname -n结果)加入到/etc/hosts里。

复制代码代码如下:[root@C ~]# uname -n C [root@C ~]# cat /etc/hosts #modi by oldboy : /9/ .0.0.1 C localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 .0.0. C ################

Linux服务器端SSH远程连接速度慢的解决方法(Linux服务器端口状态)

利用ssh -v的调试功能查找慢的原因

其实可以用下面的命令调试为什么慢的细节(学习这个思路很重要)。

复制代码代码如下:[root@C ~]# ssh -v root@.0.0. OpenSSH_5.3p1, OpenSSL 1.0.0-fips Mar debug1: Reading configuration data /etc/ssh/ssh_config debug1: Applying options for * debug1: Connecting to .0.0. [.0.0.] port . debug1: Connection established. debug1: permanently_set_uid: 0/0 debug1: identity file /root/.ssh/identity type -1 debug1: identity file /root/.ssh/id_rsa type -1 debug1: identity file /root/.ssh/id_dsa type -1 debug1: Remote protocol version 2.0, remote software version OpenSSH_4.3 debug1: match: OpenSSH_4.3 pat OpenSSH_4* debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_5.3 debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: server->client aes-ctr hmac-md5 none debug1: kex: client->server aes-ctr hmac-md5 none debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(<<) sent debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP debug1: SSH2_MSG_KEX_DH_GEX_INIT sent debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY The authenticity of host '.0.0. (.0.0.)' can't be established. RSA key fingerprint is ca::::0e:5a:1c:7d:ef:fc:::::ad:f9. Are you sure you want to continue connecting (yes/no)? yes =======>老男孩老师评:这里就是提示保存密钥的交互提示。 Warning: Permanently added '.0.0.' (RSA) to the list of known hosts. debug1: ssh_rsa_verify: signature correct debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug1: SSH2_MSG_SERVICE_REQUEST sent debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: publickey,password debug1: Next authentication method: publickey debug1: Trying private key: /root/.ssh/identity debug1: Trying private key: /root/.ssh/id_rsa debug1: Trying private key: /root/.ssh/id_dsa debug1: Next authentication method: password root@.0.0.'s password: =======>老男孩老师评:这里就是提示输入密码的交互提示。 debug1: Authentication succeeded (password). debug1: channel 0: new [client-session] debug1: Entering interactive session. debug1: Sending environment. debug1: Sending env LANG = en_US.UTF-8 Last login: Tue Sep :: from .0.0.

在远程连接时如果慢就可以确定卡在哪了。

复制代码代码如下:[root@C_A ~]# ssh -v oldboy@.0.0. OpenSSH_5.3p1, OpenSSL 1.0.0-fips Mar debug1: Reading configuration data /etc/ssh/ssh_config debug1: Applying options for * debug1: Connecting to .0.0. [.0.0.] port . debug1: Connection established. debug1: permanently_set_uid: 0/0 debug1: identity file /root/.ssh/identity type -1 debug1: identity file /root/.ssh/id_rsa type -1 debug1: identity file /root/.ssh/id_dsa type 2 debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3 debug1: match: OpenSSH_5.3 pat OpenSSH* debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_5.3 debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: server->client aes-ctr hmac-md5 none debug1: kex: client->server aes-ctr hmac-md5 none debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(<<) sent debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP debug1: SSH2_MSG_KEX_DH_GEX_INIT sent debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY debug1: Host '.0.0.' is known and matches the RSA host key. debug1: Found key in /root/.ssh/known_hosts:2 debug1: ssh_rsa_verify: signature correct debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug1: SSH2_MSG_SERVICE_REQUEST sent debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password debug1: Next authentication method: gssapi-keyex debug1: No valid Key exchange context debug1: Next authentication method: gssapi-with-mic

上述配置没配就发现卡到gssapi这。就大概知道是gssapi的问题。

实际上在linux系统优化部分就应该优化SSH服务的此处。

在Linux 中产生和加密解密随机密码的教程 1.使用命令pwgen来生成一个长度为个字符的独特的随机密码。假如你还没有安装pwgen,请使用Apt或YUM等包管理器来安装它。复制代码代码如下:$pwgen生

在Linux服务器上升级Docker的教程 Docker,一个流行的将软件打包的开源容器平台,已经有了新的1.6版,增加了许多新的特性。该版本主要更新了DockerRegistry、Engine、Swarm、Compose和Machine等

Linux下5个有趣的命令行技巧介绍 你有将Linux物尽其用吗?对很多Linux用户来说,有很多看起来是技巧的有用特性。有些时候你会需要这些技巧。本文会帮助你更好得使用一些命令,发挥

标签: Linux服务器端口状态

本文链接地址:https://www.jiuchutong.com/biancheng/366121.html 转载请保留说明!

上一篇:win10怎么分屏? win10分屏快捷键的使用方法(win10怎么分屏操作)

下一篇:在Linux 中产生和加密解密随机密码的教程(在linux系统中)

  • 财政的税收
  • 去年的电费可以在今年入账分录
  • 现金流量表抵消分录
  • 会计核算是否健全 填错了有影响吗
  • 什么时候确认应收股利
  • 出差补贴需要交税
  • 误餐补助缴个税怎么申报
  • 个贷系统平账专户A户
  • 工会支出发票抬头是企业名称可以吗
  • 增值税专用发票抵扣税额是什么意思
  • 返利款进项税是否需要换算
  • 制造企业售后服务方案
  • 纳税人发生纳税义务,未按照规定
  • 医药酒精现在要兑水喝吗
  • 小规模纳税人第四季度怎么报税
  • 所得税汇算清缴扣除标准
  • 溢价转让股权的会计处理
  • 现金银行存款日记账日清月结
  • 支付工程款时有哪些费用
  • 折旧是属于公司成本吗
  • 租赁厂房水电费怎么算
  • 呆账怎么写会计分录
  • 自营出口与委托代理哪个划算
  • 银行利息借贷方怎么做凭证
  • Windows11安装不了空件怎么处理
  • 怎样清理ie
  • 支付宝安全控件是什么
  • 怎么解决windows许可证即将过期
  • php实现的跟QQ和MSN类似的BICQ v2.0.0
  • 苹果电脑进入安全模式按什么键
  • linux常见的文本编辑工具有哪些
  • 系统远程桌面连接怎么用
  • php gethostname
  • 股票期权行权的基本每股收益怎么算
  • framework3.5怎么打开
  • 金蝶软件可以自学吗
  • java开源二次开发平台
  • 再次回归的成语
  • 帝国cms移动端
  • 采矿权如何进行融资
  • 怎样网上抄税
  • 小规模纳税人的企业所得税怎么算
  • 网络课平台用交税吗
  • 项目建设期算不算折旧
  • python访问字符串
  • 支付委托加工费的记账凭证
  • 账实不符的后果和对策
  • 专项储备期末有余额吗
  • sqlserver导入导出数据库
  • 出售固定资产不确认收入
  • 所得税核定征收的政策
  • 施工企业的成本核算
  • 收到商业汇票怎么入账
  • 收到的出口退税款需要并入利润总额吗
  • 机器设备一般折旧几年
  • 未分配利润期初余额怎么录入
  • 废料卖出算哪种收入
  • mysql 5.7.9 winx64在windows上安装遇到的问题
  • system is boot up with
  • 修改注册表显示隐藏文件
  • win8系统分辨率调不了
  • 苹果mac怎样
  • msoobe.exe是什么
  • win7更改电脑设置在哪里
  • perfom.exe
  • win7文件夹怎么显示大小
  • win10系统怎么设置最好
  • w10qq图标不显示
  • 如何在linux系统中卸载一个已装载的文件系统
  • 批处理bat
  • python标准库很庞大,它可以帮助处理各种工作,包括
  • bootstrap怎么用
  • js对象常用方法
  • unity怎么弄游戏小地图
  • BootStrap iCheck插件全选与获取value值的解决方法
  • 住宿发票税率1%怎么回事
  • 12366纳税服务热线工作时间
  • 江西省国家税务局李德平
  • 税收公司法人有风险么
  • 现在企业可以享受低保吗
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

    网站地图: 企业信息 工商信息 财税知识 网络常识 编程技术

    友情链接: 武汉网站建设