vnc在ubuntu服务器上的安装

最近为了保密性领导要禁用ssh使用vnc登录服务器。

安装和卸载
sudo apt-get install vnc4server
sudo apt-get remove vnc4server

vncserver -kill :1


vncserver :1


vncview下载地址
https://www.realvnc.com/en/connect/download/viewer/
192.168.120.146
博客教程
https://www.cnblogs.com/Jasxu/p/xushouwei_centos_vnc.html
http://blog.itpub.net/519536/viewspace-607549/





更改配置
vi /home/omnisky/.vnc/xstartup
改变分辨率
vncserver -geometry 1920×1080 


完全安装教程:
https://blog.csdn.net/xiji321/article/details/78579622


关闭ssh服务
https://zhidao.baidu.com/question/1707384950846658940.html


/etc/init.d/ssh stop




使用要使用vncserver的用户登录ssh
vncserver


vi /home/zhaodz/.vnc/xstartup
#!/bin/sh
# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#x-window-manager &
sesion-manager & xfdesktop & xfce4-panel &
xfce4-menu-plugin &
xfsettingsd &
xfconfd &
xfwm4 &


vncserver -kill :1
vncserver :1


修改密码
vncpasswd 

猜你喜欢

转载自blog.csdn.net/andeyeluguo/article/details/80889261