Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[sw][linux] ssh config #123

Open
konosubakonoakua opened this issue Nov 26, 2024 · 1 comment
Open

[sw][linux] ssh config #123

konosubakonoakua opened this issue Nov 26, 2024 · 1 comment

Comments

@konosubakonoakua
Copy link
Owner

konosubakonoakua commented Nov 26, 2024

keep alive

On Client Side:
linux

cat >> ~/.ssh/config << 'EOF'
Host *
    TCPKeepAlive yes
    ServerAliveInterval 60
    ServerAliveCountMax 3
EOF

windows

$configContent = @"

Host *
    TCPKeepAlive yes
    ServerAliveInterval 60
    ServerAliveCountMax 3
"@
Add-Content -Path "$env:USERPROFILE\.ssh\config" -Value $configContent

Or on Server Side:

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
Repository owner locked and limited conversation to collaborators Nov 26, 2024
@konosubakonoakua
Copy link
Owner Author

Trouble shoot

Unable to negotiate with 192.168.137.222 port 22: no matching host key type found. Their offer: ssh-rsa

Solution:

ssh -oHostKeyAlgorithms=+ssh-rsa [email protected]

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant