策划案网站,代理记账公司注册条件,网站开发 占位符,十大外包公司排名优化ssh链接速度 xshell中内置了ssh链接的客户端#xff0c;Linux系统内置了ssh的服务端sshd#xff0c;默认是开启的#xff0c;在mac系统中#xff0c;sshd是默认关闭的#xff0c;需要手动开启。 [rootlocalhost ~]# ls /etc/ssh
moduli sshd_config ssh_…优化ssh链接速度 xshell中内置了ssh链接的客户端Linux系统内置了ssh的服务端sshd默认是开启的在mac系统中sshd是默认关闭的需要手动开启。 [rootlocalhost ~]# ls /etc/ssh
moduli sshd_config ssh_host_ecdsa_key.pub ssh_host_ed25519_key.pub ssh_host_rsa_key.pub
ssh_config ssh_host_ecdsa_key ssh_host_ed25519_key ssh_host_rsa_key# sshd_config就是服务端的配置文件修改之前先进行备份
[rootlocalhost ssh]# cp sshd_config sshd_config.bak
[rootlocalhost ssh]# vi sshd_config
:set number
79gg #定位到79行
GSSAPIAuthentication yes 改为no
115gg #定位到115行
#UseDNS yes 去掉井号 改为no
UseDNS no
:wq #保存
# 重启sshd程序
[rootlocalhost ssh]# systemctl restart sshd优化selinux
安全机制但是开启后操作起来会很麻烦。 永久关闭配置
[rootlocalhost ssh]# vi /etc/selinux/config
:set number
7gg
SELINUXenforcing改为disabled
# 需要重启生效生产环境下无法重启可以先临时关闭
[rootlocalhost ssh]# setenforce 0
# 查看selinux状态
[rootlocalhost ssh]# sestatus
SELinux status: enabled
SELinuxfs mount: /sys/fs/selinux
SELinux root directory: /etc/selinux
Loaded policy name: targeted
Current mode: permissive允许不使用 enfrocing强制使用
Mode from config file: disabled
Policy MLS status: enabled
Policy deny_unknown status: allowed
Max kernel policy version: 31关闭firewalld 关闭防火墙和开机自启动 [rootlocalhost ssh]# systemctl stop firewalld [rootlocalhost ssh]# systemctl disable firewalld Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service. Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service. 安装常用软件
[rootlocalhost ssh]# yum install lrzsz vim tree wget net-tools screen tcpdump bash-completion -y
lrzsz上传下载
vim编辑器
tree显示目录结构
wget下载东西
net-tools网络相关工具可以通过rpm -ql net-tools查看相关命令。
screen屏幕工具网络不稳定时防止程序中断
tcpdump抓包
bash-completiontab键的加强版 输入-再使用tab键会提示有哪些参数screen用法
# 开启screen屏幕
[rootlocalhost ssh]# screen
# 查看screen窗口
[rootlocalhost ~]# screen -ls
There is a screen on:2002.pts-0.localhost (Detached)
1 Socket in /var/run/screen/S-root.
# 恢复screen窗口
[rootlocalhost ~]# screen -r 2002 # screen编号 通过 screen -ls查询
# 退出screen窗口
[rootlocalhost ssh]# exit查看已经安装的软件包
# 查看已安装软件包的个数
[rootlocalhost ~]# rpm -qa | wc -l