安装SSH服务
1apt-get install openssh-server
修改SSH配置文件
1vim /etc/ssh/sshd_config
配置项
1# 监听端口
2Port 22
3
4# 监听地址
5ListenAddress 0.0.0.0
6
7# 是否允许root用户登录
8PermitRootLogin yes
9
10# 允许密码认证
11PasswordAuthentication yes
12
13# 允许密钥认证
14PubkeyAuthentication yes
15
16# 客户端保活
17ClientAliveInterval 60
18ClientAliveCountMax 3
Message of the Day
内容放在vim /etc/motd
,可以用 UpdateMotd 动态生成的内容,也可以直接使用landscape-common
1apt-get install landscape-common
重启ssh服务
1systemctl restart sshd
除另有声明外,本博客文章均采用 知识共享 (Creative Commons) 署名 4.0 国际许可协议 进行许可。转载请注明原作者与文章出处。