Bonjour à tous,
J'utilise une connexion à distance pour gérer un serveur sous CentOS 5.2 pour celà j'utilise Putty pour le tunnel SSH et realvnc pour visualiser le bureau du serveur à distance .
Seulement voilà, j'arrive très bien à me connecter sur le serveur distant via putty en SSH. Si je lance après l'exécution de putty vncviewer , ce dernier affiche un message d'erreur :
Citation:
|
The connection closed unexpectedly Do you wish to attempt to reconnect to localhost:5901 ?
|
Malgres que j'arrête le vncserver sur le serveur distant et arrêté les processus en rapport avec Xvnc en effectuant
par exemple.
Je refais ensuite :
Code :
1 2 3 4 5 6
| # vncserver :1
New 'machine:1 (root)' desktop is machine:1
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/machine:1.log |
pour démarrer vncserver .
Voici le contenu du fichier /etc/sysconfig/vncservers
Code :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| # The VNCSERVERS variable is a list of display:user pairs.
#
# Uncomment the lines below to start a VNC server on display :2
# as my 'myusername' (adjust this to your own). You will also
# need to set a VNC password; run 'man vncpasswd' to see how
# to do that.
#
# DO NOT RUN THIS SERVICE if your local area network is
# untrusted! For a secure way of using VNC, see
# <URL:http://www.uk.research.att.com/archive/vnc/sshvnc.html>.
# Use "-nolisten tcp" to prevent X connections to your VNC server via TCP.
# Use "-nohttpd" to prevent web-based VNC clients connecting.
# Use "-localhost" to prevent remote VNC clients connecting except when
# doing so through a secure tunnel. See the "-via" option in the
# `man vncviewer' manual page.
VNCSERVERS="1:root"
VNCSERVERARGS[1]="-geometry 1024x768 -depth 16" |
ainsi que le contenu du fichier /root/.vnc/xstartup:
Code :
1 2 3 4 5 6 7 8 9 10 11 12
| #!/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 &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
twm & |
Comment puis je résoudre le problème d'affichage du bureau du serveur à distance via vnc viewer ?
Cordialement .