1、設置root賬戶密碼
sudo passwd root
2、安裝net-tools
apt install net-tools
查看本機IP:
ifconfig
2、安裝vim
apt install vim
3、啟用ssh
新Ubuntu之后默認沒有ssh服務,需要自己安裝ssh(進入etc/ssh,看到只有ssh_config文件)
apt install openssh-server
進入etc/ssh,可以看到安裝了openssh-server之后,多出了sshd_config等多個文件
打開sshd_config
vim sshd_config,
找到PermitRootLogin選項,將其后面的參數改為yes
保存退出,重啟ssh
systemctl restart sshd
使用sshd登錄到這臺主機,
可以登錄,O了!
posted on 2021-02-22 11:01
小王 閱讀(319)
評論(0) 編輯 收藏 引用 所屬分類:
linux