please visit 7effects.com
BANGALORE, INDIA: It sometimes becomes very difficult to remotely manage a Linux server or a machine, as the only available tool we find is either Putty or some kind of remote desktop sharing application such as VNC. Both of them have their own drawbacks. Putty might be very well known and admired amongst Linux geeks but Linux has become a very rich GUI and while using Putty we end up administering the Linux box with commands alone, which is not fair. Isn't it? Now take the case of VNC.
The biggest drawback with VNC is that at the Linux box someone has to install and run VNC so that one can connect to it remotely. The other problem with VNC is that it is not natively secure. There are ways to encrypt VNC traffic but for that you have do some tweaking.
Wouldn't it be nice if by running only SSH on a server, you can do remote command line sessions, remote file transfer with a GUI, and remote app streaming even on Windows machines? Would you believe it? Well! Keep on reading. We have something really interesting in store.
Direct Hit!
Applies To: IT managers
USP: Understand how to use and administer a Linux machine from a Windows desktop
Primary Link: None
Google Keywords: Xming, Putty, WinSCP
A simple command line
Connecting a command line terminal from a Windows client to a Linux box over SSH is nothing new. But for those who are new to Linux administration a small recap. Using a simple tool called Putty (even available for 32 and 64 bit Windows Oses, including Vista) one can initiate and connect to a Linux box running SSHD (SSH daemon). All one has to do is to download putty.exe file from www.chiark.greenend.org.uk /~sgtatham/putty/download.html and run it. A screen will pop-up, where you need to fill in the IP address of the Linux machine that you want to connect. Just below the IP address field, you will see a list of protocols that you can connect to a Linux box, such as SSH, Telnet, Rlogin, etc. By default SSH is selected. If you want to change to some other protocol, then do that right here, else click on the open button and a terminal window will open up, asking you the username and password of the Linux box. Provide the authentication and there you are-logged into a Linux system from a Windows machine.
Using Putty one can connect to a Linux machine's terminal using a Windows client over an encrypted SSH Link
GUI file copying
Let's assume that you are managing a server remotely and you want to copy or move some file from your Windows client to the Linux machine. How will you do that? One option is to run Putty, configure SMB through the command line, access the SMB share over the network and copy the file. The problem with this approach is that first, it's pretty time consuming and geeky in nature and second, you end up unnecessarily opening up the SMB port to your Linux server, making it vulnerable to attacks.
Now, try this method. Download WinSCP from http://sourceforge.net/ project/showfiles.php?group_id=85589&release_id=549322 and run it. It will first ask you to provide the IP address and authentication details of the Linux box you want to connect. Provide the details and connect. It will then open up a nice little explorer like window. At the left side of the interface it will show your Windows' file system and at the right side your Linux machine's file system. And voila! You can now copy, paste or move files between the file systems of both machines seamlessly. And the best part of this technique is that you end up using file copy over the SSH protocol which makes it natively encrypted and secure in nature.
Stream Linux apps on Win
Now this is the most interesting part. We have seen how you can connect to a Linux machine's terminal using Putty. We have seen how you can move across files between Linux and Windows machines. But believe it or not! Today, Linux has a very usable and intuitive GUI and there are lots of configuration and administration tools in Linux which are available for X windows. And that's why, even the hard-core geeks don't prefer to go to the Linux console for tweaking their Linux box. Rather they try to do it more quickly the GUI way. So, what if I want to configure the basic firewall settings of a remote Linux machine running Fedora 8. Should I go for Putty and run a hundred IPTable commands to configure it. No, not required, rather you can directly run the firewall configuration application (which is system-config-securitylevel in fedora) from your Windows machine. And you don't even need software like VNC, etc to be installed at the other end. Our good old SSH is sufficient. As a result the complete communication will be encrypted and secure.
Using Windows SCP, one can move files between a Linux and a Windows machine over the network through the Secure SSH protocol
The, other benefit is that as you are not sharing the complete desktop of the Linux machine, in fact only streaming a particular application, and hence don't have to switch between two different desktops. And you can run both gedit and notepad simultaneously on the XP/Vista desktop.
With Xming one can stream Linux applications to a Windows desktop over the SSH protocol. Notice both Win & Lin apps on the same Windows desktop
Now, let's see how it actually works. The concept is very simple. SSH with a small parameter (-X) has the capability to stream any/all Linux applications to other machines that are running XServer on the same network. So, if you are running Linux on two machines in your network, where the first one has OpenOffice installed and the second doesn't, you can easily connect to the first machine from the second over SSH, by running:
#ssh –X ip-address-of –the-first-machine
From the ssh terminal, if you run openoffice.org, the second machine (without OpenOffice installed) will be able to stream the complete OpenOffice suite from the first machine over SSH protocol.
You must now be wondering that even if this is possible, you would still require a machine with XServer, and in Windows we don't have XServer, so how can we do the same kind of streaming to a Windows machine. Well there are quite a few third party XServers available for Windows even. Some are free and Open Source while others are paid. You can install one such tool and easily stream Linux apps on your Windows machine.
With the XLaunch wizard you can configure the Linux application that you want to remotely stream to your Windows desktop
The one which we tested is called 'Xming' and is completely free to download and use. You can get it from http://sourceforge.net/projects/xming. Download the XMing and the Fonts installer file and install it on the Windows machine where you want run the streamed apps. Once done, you will see a tool called XLaunch. This tool can be used as a wizard to connect and stream any Linux application. To use it, run the XLaunch executable file. A wizard will open up. On the first screen, you have four options to select from. If you want to get a complete desktop of the remote Linux machine, select the second or the fourth option. But if you want to just stream a few apps directly on your Windows desktop, select the first option. We recommend that you go for the first option. Now press Next. On the second screen, select the second option which says 'Start a Program' and proceed. The next screen will ask for the application that you want to stream. The default setting is 'xterm.' If you go with this option alone, the wizard would open a Linux terminal for you. From this terminal you can run and start any graphical application installed on your Linux box.
But if you want to directly start an application, let's say Gedit, simply type in the name in the 'Start program' field. In the "Run Remote" section, select the first radio button which says "Using Putty (plink.exe)" and provide the IP address, username and password of the remote Linux machine. Once you proceed, the wizard will ask whether you need Clipboard and Access Control to be enabled or not. Select the options according to your requirements and proceed. The last screen will ask you whether you want to save the settings that you have just made or not. Click on the Finish to end. And whatever applications you have selected for, will start running on top of your Windows desktop.
please visit 7effects.com
No comments:
Post a Comment