问题现象:在网络延迟正常的情况下,使用ssh连接服务器过程中服务器响应时间过长问题原因:服务器的ssh服务开启了DNS反解析导致响应时间过长解决办法:在ssh服务端配置文件中禁用DNS反解析:以linux操作系统为例,在sshd配置文件/etc/ssh/sshd_config中添加如下配置UseDNSno重载sshd服务systemctlreloadsshd
分类:
其他好文 时间:
2020-06-22 09:36:12
阅读次数:
98
用SSH登录到Linux的时候,由于默认的连接超时时间很短,经常需要短了后再连接,比较麻烦。可以通过设置linux ssh配置解决 1. #vim /etc/ssh/sshd_config 2. 搜索并修改(没有的话在末尾添加):ClientAliveInterval 60ClientAliveCo ...
分类:
系统相关 时间:
2020-06-18 23:25:02
阅读次数:
98
1.ubuntu 18.04系统默认是普通用户登录,首先设置root密码 sudo passwd 2.安装openssh-server apt install openssh-server -y 如果出现报错,请参考下图解决即可 3.修改配置文件/etc/ssh/sshd_config 插入一行配置 ...
分类:
系统相关 时间:
2020-06-15 13:42:25
阅读次数:
134
ssh开启 ee /etc/inetd.conf #去掉sshd注释 ee /etc/ssh/sshd_config PermitRootLogin no改为PermitRootLogin yes PasswordAuthentication no改为PasswordAuthentication y ...
分类:
其他好文 时间:
2020-06-08 23:53:20
阅读次数:
102
1、修改sshd_config配置文件 kali终端输入 vi /etc/ssh/sshd_config 2、将#PermitRootLogin prohibit-password 前面的#去掉,并改成PermitRootLogin yes (保险起见,建议在此之前将此句复制一份) 3、找到#Pas ...
分类:
其他好文 时间:
2020-06-04 10:36:50
阅读次数:
81
修改sshd_config文件 vim /etc/ssh/sshd_config 将#PasswordAuthentication yes的注释去掉 将#PermitRootLogin prohibit-password的注释去掉 ,prohibit-password 改为yes 重启服务 serv ...
分类:
系统相关 时间:
2020-05-27 20:31:06
阅读次数:
114
linux登录超时设置 # 设置用户登录180s没有操作交互就注销当前登录用户 vim /etc/profile export TMOUT=180 180秒登录超时 禁止root用户通过远程ssh登录(可在服务器宿主机上登录) vim /etc/ssh/sshd_config PermitRootL ...
分类:
其他好文 时间:
2020-05-21 13:25:40
阅读次数:
147
由于是报密钥问题,我又检查了git上的密钥,发现没有问题 最后的解决办法是发现sshd配置文件/etc/ssh/sshd_config,UsePAM没开 ...
分类:
其他好文 时间:
2020-05-08 13:14:46
阅读次数:
118
1、修改文件 # vi /etc/ssh/sshd_config # vi /etc/ssh/sshd_config 找到 #ClientAliveInterval 0#ClientAliveCountMax 3 修改为 ClientAliveInterval 60ClientAliveCountM ...
分类:
其他好文 时间:
2020-05-06 14:00:37
阅读次数:
64
1.修改ssh配置文件 1 vim /etc/ssh/sshd_config 2 ##取消一下注释 修改值 3 ClientAliveInterval 30 ##心跳检测 每隔30秒发送一次 4 ClientAliveCountMax 86400 ##客户端多少次没有相应,服务器自动断掉连接 2.重 ...
分类:
其他好文 时间:
2020-04-30 21:00:42
阅读次数:
103