123 [sw][linux] ssh config
keep alive
On Client Side: linux
cat >> ~/.ssh/config << 'EOF'
Host *
TCPKeepAlive yes
ServerAliveInterval 60
ServerAliveCountMax 3
EOF
$configContent = @"
Host *
TCPKeepAlive yes
ServerAliveInterval 60
ServerAliveCountMax 3
"@
Add-Content -Path "$env:USERPROFILE\.ssh\config" -Value $configContent
sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak
sudo sed -i \
-e '/^#TCPKeepAlive/c\TCPKeepAlive yes' \
-e '/^#ClientAliveInterval/c\ClientAliveInterval 60' \
-e '/^#ClientAliveCountMax/c\ClientAliveCountMax 3' \
/etc/ssh/sshd_config
Comments
konosubakonoakua · 2024-12-12T01:18:26Z
Trouble shoot
Unable to negotiate with 192.168.137.222 port 22: no matching host key type found. Their offer: ssh-rsa
Solution: