openEuler关闭防火墙以及vscode远程SSH链接

:::warning

目前vscode ssh链接openEuler始终连不上。openEuler是安装在Parallels Desktop里面的。

暂时放弃。

:::

查看目前的防火墙状态

1
systemctl status firewalld

关闭防火墙

1
sudo service firewalld stop

SSH

VSCode Remote SSH
需要在VSCode中安装插件 Remote SSH 或者直接安装 Remote Development ,这样就可以在VSCode中使用SSH了。

修改openEuler虚拟机内部的 /etc/ssh/sshd_config ,启用如下设置:

1
2
3
AllowAgentForwarding yes
AllowTcpForwarding yes
GatewayPorts yes

刷新sshd服务状态:

1
sudo systemctl restart sshd.service

Parallels Desktop安装openEuler及初始化配置

缘由

Docker desktop for mac目前做的太差,除了性能低下,还有一些无法解决的问题,比如网络绑定,而这些在原生Linux里面都不存在。所以还是使用Linux来运行docker容器体验最好。

安装openEuler

下载 openEuler 22.03 LTS。

openEuler-22.03-LTS-x86_64-dvd.iso

选择 最小安装 。 注意勾上 容器 和 开发工具 。

更新openEuler

1
sudo dnf update

SSH链接openEuler

先安装net-tools查看ip

1
sudo dnf install net-tools

查看ip,然后使用ZenTermLite链接即可

1
ifconfig

安装chsh

1
sudo dnf install util-linux-user

安装zsh

1
sudo dnf install zsh

安装oh-my-zsh

1
2
3
4
5
6
git clone https://gitee.com/mirrors/oh-my-zsh.git ~/.oh-my-zsh \
&& cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc \
&& git clone https://gitee.com/playerfs/zsh-autosuggestions.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions \
&& git clone https://gitee.com/playerfs/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting \
&& sed -i 's/^plugins=(/plugins=(zsh-autosuggestions zsh-syntax-highlighting /' ~/.zshrc \
&& chsh -s /bin/zsh

安装vim

1
sudo dnf install vim

配置SSH

完整的配置 ~/.ssh/config

1
2
3
4
# open-euler
Host pl-open-euler
HostName 192.168.3.63
User terwer