linux远程桌面连接windows
linux 主机端:
1 2
| sudo apt install rdesktop sudo pacman -S rdesktop
|
rdesktop连接
1
| rdesktop -f 122.207.129.174 -u user -p **** -a 16
|
命令参数常用的有:
1 2 3 4 5 6 7
| -u用户名 -p密码 -n客户端主机名(显示windows任务管理器中的连接客户端名) -g桌面大小( 宽* 高)[也可以用 x(小写的X)] -f全屏模式,从全屏模式切换出来按Ctrl+Alt+Enter -a连接颜色深度(最高到16位),一般选16才会显示真彩色(window7支持32位) -0数字0表示连接上windows控制台,等效mstsc/console命令
|
退出全屏: ctl + alt + enter
参考文献,Remmina
remmina支持文件夹共享
windows连接linux图形桌面
linux客户端:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
| sudo apt update sudo apt install xfce4 xfce4-goodies sudo apt install tightvncserver
vncserver
vncserver -kill :1 vim .vnc/xstartup
xrdb $HOME/.Xresources xsetroot -solid grey export XKL_XMODMAP_DISABLE=1 /etc/X11/Xsession startxfce4 & sudo chmod 755 .vnc/xstartup
vncserver
|
rdesktop连接:
- 开始->运行中输入mstsc快速打开远程桌面工具
- 输入预远程桌面Linux服务器的IP地址,点击连接即可打开xrdp图形界面
- mode:vnc-any, ip:192.168.1.,port:5900+1,password:57*
- 如果提示错误可能是服务器端vncserver没有开启,输入vncserver,如果密码忘记重设密码,要删除.vnc下的passwd然后输入vncserver进行重置。
参考文献
ssh链接:
1 2 3 4 5 6 7 8 9 10 11 12 13
| sudo apt-get remove openssh-server sudo apt-get install openssh-server vim /etc/ssh/sshd_config Port 22 PasswordAuthentication yes sudo service ssh --full-restart
ClientAliveInterval 60 ClientAliveCountMax 3
systemctl restart sshd
|
hwVNC登录设置
(REF),通过vncviewer链接服务器(REF)
vnc和vncviewer登录
1 2 3 4 5 6 7 8 9
| cp /etc/hostname /etc/hostname_backup sudo reboot
liupei@hw:~$ df -h | grep /dev/vda1 /dev/vda1 40G 24G 14G 63% /
|
xshell
使用Xshell连接WSL
- 安装ssh
1
| sudo apt autoremove --purge openssh-server -y && sudo apt install openssh-server -y
|
- 修改SSH配置
编辑配置文件
sudo vim /etc/ssh/sshd_config
添加配置(开放端口)
Port 20
重启并查看本机IP
查看本机IP
在 xshell
中添加