请输入手机号码
请输入密码
通过 SSH 管理香港服务器的完整指南
一 连接前的准备
ssh username@服务器IP(默认端口 22)。二 首次连接与登录
ssh username@服务器IP,按提示输入密码完成登录。ssh username@IP -p 端口号。三 服务器端开启与验证 SSH 服务
sudo apt-get update && sudo apt-get install -y openssh-serversudo systemctl start sshsudo systemctl enable sshsudo systemctl status ssh,看到 active (running) 即正常。四 安全加固与日常运维
sudo apt-get update && sudo apt-get upgrade -ysudo systemctl restart nginxscp file.txt username@IP:/path/,或 rsync -avz local/ username@IP:/remote/五 常见问题与网络优化
ping、telnet IP 22)。~/.ssh/config 中添加:ServerAliveInterval 30ServerAliveCountMax 5C:\Users\<用户名>\.ssh\config 添加:Host *
ProxyCommand connect -S <代理IP>:<代理端口> %h %p
ServerAliveInterval 30
ServerAliveCountMax 5