武汉专业做网站开发的公司促销策略的四种方式
在本地客户端操作:
ssh远程连接一段时间会失效的问题
vim /etc/ssh_config或vim /etc/ssh/ssh_config
在末尾添加ServerAliveInterval 30,意思是30s会发送一次向服务器连接的请求,以保持会话始终在线
验证: 放一段时间不操作,我们的终端仍然是保持链接状态,这步就成功了。
重启客户端 service ssh restart
在服务器操作:
linux解决ssh tunnels端口不能转发问题
我们需要打开公网服务器网管开关/etc/ssh/sshd_config 修改 GatewayPorts yes
PasswordAuthentication yes 是否可以密码认证,也修改成yes
AllowTcpForwarding yes
GatewayPorts yes
TCPKeepAlive yes
PasswordAuthentication yes
重启sshd
service sshd restart
SSH 本地转发-L [bind_address:]port:host:hostport
本地端口转发(Local Port Forwarding),是将本地主机某个端口流量转发到远程主机的指定端口
内网端口映射到外网 [核心]
映射本地的3308端口到外网服务器3306端口
sh -L 192.168.119.1:3308:10.224.105.96:3306 root@103.81.5.183