I will be shipping off my Debian box to a remote location and I need to have remote desktop access to the Debian-7 box from my Windows OS laptop. Heres how to set things up.
1) update Debian-7 and install OpenSSH SSHD server
a) to update Debian, type on terminal: apt-get update
b) to install openSSH server, type on terminal: apt-get install openssh-server
After installation, the following commands can be used to start, stop or verify OpenSSH server's status:
- service ssh stop
- service ssh start
- service ssh restart
- service ssh status
To verify if OpenSSH server is working properly, at terminal, and as "root", type: "ssh localhost". you would be prompted for a username and then a password, for example:
root@debian7:/home# ssh localhost
The authenticity of host 'localhost (::1)' can't be established.
ECDSA key fingerprint is f6:27:5c:be:3a:5f:38:62:fd:a1:8a:75:5d:0f:fa:a6.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'localhost' (ECDSA) to the list of known hosts.
Linux debian7 3.2.0-4-686-pae #1 SMP Debian 3.2.46-1 i686
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sat Jul 6 23:21:29 2013 from 18.104.22.168
From another computer, your SSH server is accessible using an SSH client and the IP-address of your server, for ex: Putty.
2) Install VNC4Server on Debian-7 Wheezy:
a) To install VNC4Server, command is: aptitude -y install vnc4server
b) To set password for a vnc user, "su" to the user and type "vncpasswd":
example: tokunbo@debian7:/$ vncpasswd (you'll be prompted to enter a passwd for this user)
c) To start VNCserver: tokunbo@debian7:/$ vncserver :1
d) To stop VNCserver: tokunbo@debian7:/$ vncserver -kill :1
e) Note: Edit and add the following to .vnc/xstartup:
# add the line below:
exec gnome-session &
f) Now, start VNC with a display number with a screen resolution setting:
at terminal, type the command: vncserver :1 -geometry 1280x768 -depth 16
Note: you might need to tweak the resolution and depth settings above for a clearer screen.
root@debian7:/# vncserver :1 -geometry 1280x768 -depth 16
New 'debian7:1 (root)' desktop is debian7:1
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/debian7:1.log
Download and install VNC Viewer from: http://www.realvnc.com/download/ on your windows desktop to access the server.
Thats all folks!!