0
点赞
收藏
分享

微信扫一扫

对ubuntu容器的一些初始化配置指令记录

_阿瑶 2024-02-02 阅读 11

1. 更新软件包 

 apt update
apt -y upgrade

2.安装vim 和ssh

apt-get install vim
apt-get install openssh-server 

3.给root设置密码 

passwd root

4.配置ssh 

vim /etc/ssh/sshd_config

把 PermitRootLogin without-password 改为 PermitRootLogin yes,注意PermitRootLogin without-password被注释掉了,要去掉注释。把port 22的注释取消。

 允许ssh 开机自启动

systemctl enable ssh

其他ssh命令

service ssh start
service ssh restart
service ssh status
举报

相关推荐

0 条评论