ubuntu配置笔记

一、ubuntu的mnt/hgfs下共享文件夹设置

1.确认VMware Tools和共享目录设定已经完成,安装vmware tool sudo apt-get install open-vm-tools
2.挂载 sudo vmware-hgfsclient

挂载成功

二、IP地址
ifconfig查询没有ip地址:

这个时候分别输入下面命令,重新获取ip地址

sudo dhclient ens33
sudo ifconfig ens33

再使用ifconfig -a即可

三、ssh

安装ssh服务器
sudo apt install openssh-server

安装ssh客户端
sudo apt install openssh-client

配置ssh客户端
sudo vi /etc/ssh/ssh_config
去掉PasswordAuthentication yes前面的#号,保存退出

配置sshd_config
sudo vi /etc/ssh/sshd_config
在PermitRootLogin prohibit-password这行行首加上"#" ,在此行下面添加新一行 PermitRootLogin yes

重启ssh
sudo /etc/init.d/ssh restart

vscode ssh remote使用ssh远程连接
$ ssh @<ssh_ip>

posted @ 2023-10-26 01:10  xioahuhu  阅读(5)  评论(0编辑  收藏  举报