This is a reader-contributed article.
Technology has changed dramatically in the last decade. OpenSSH is one the best project. It allows you to control remote Linux / UNIX server using command line or GUI tools.
Do you miss GUI configuration server management tools such as Debian network-admin or Redhat/Cent os system-config-* tools/utilities while administrating a Linux server? Do you want to run GUI admin tools on a remote Linux server and get display on local desktop or laptop X server system?
I have been using OpenSSH X11 forwarding and it works very well with DSL / ADSL/ cable connections.
Our setup is as follows:
#1: Remote Redhat Enterprise / Debian Linux Server
IP address: 18.104.22.168
#2: My IBM laptop running Ubuntu Linux connected via hi speed ADSL connection.
IP address: Dynamic
Step #1: Server Setup
You must have OpenSSH server installed. Open SSHD configuration file /etc/ssh/sshd_config
$ sudo vi /etc/ssh/sshd_config
Turn on X11Forwarding by setting X11Forwarding parameter to yes:
Save and close the file. Restart OpenSSH server you so the changes will take place:
$ sudo /etc/init.d/ssh restart
If you are using RedHat server, use:
# /etc/init.d/sshd restart
Logout and close ssh connection.
Step # 2: Running a command remotely
Debian Linux has the Network Administration Tool. It allows you to specify the way your system connects to other computers and to internet. Let us run this tool from laptop and make some changes to remote server networking. Open X terminal and type the command:
$ ssh -X 22.214.171.124 /usr/bin/network-admin
Run RedHat Linux system-config-httpd tool (Apache sever configuration tool):
$ ssh -X 126.96.36.199 /usr/bin/system-config-httpd
[X11 Forwarding in action]
Within few seconds (depends upon your network speed) you should see a network-admin or system-config-httpd GUI locally. The client desktop/laptop does not need any extra configuration :)
Another option is to connect to the remote server and use X port forwarding:
$ ssh -X 188.8.131.52
Make sure you replace IP address 184.108.40.206 with actual hostname or IP address.
A note for apple OS X tiger users
Instead of –X option use –Y option:
$ ssh -Y 220.127.116.11
$ ssh -Y 18.104.22.168 system-config-network
Optional : Turn on Automatic X11 Forwarding
You can turn on automatic forwarding by adding following two lines to local OpenSSH client configuration file /etc/ssh/ssh_config or ~/.ssh/config:
$ sudo vi /etc/ssh/ssh_config
Set configuration parameter:
Save the changes. You can run almost any GUI program locally :)
About the author: Rocky Jr., is an engineer with VSNL - a leading ISP / global telecom company in India and a good friend of nixCraft.