Tuesday, 2 April 2013

Crunchbang Linux - connect with SSH

SSH allows you to connect from a Windows computer to a Linux computer. This is useful for administration, it means you can access the Linux computer without having to go to it physically. You can have access to the command prompt and transfer files to/from it (for administration or for other purposes). SSH is very quick to set up, in this article I'll run through the basics and a couple of essential Windows utilities you'll need.

Install SSH on Crunchbang Linux
Right click on the desktop

Click Terminal

At the $ prompt type:
sudo apt-get install openssh-server   [Enter]

Yes that's it on the Linux side! You can now connect with SSH clients. This is just basic functionality, for more details please see the Crunchbang how-to page: http://crunchbanglinux.org/wiki/howto/ssh

Windows Utilities
To access the command prompt of Linux on your Windows computer, use Putty.
To access the files of the Linux computer use WinSCP.

Putty is a small exe program that runs on your Windows computer. It allows you to connect via SSH (Secure Shell) to a Linux computer and enter commands at the $ prompt.

On your Windows computer download Putty.exe from:

Double click the Putty.exe file.
In the Hostname box enter the host name of your Crunchbang Linux computer. You can find the host name on the Crunchbang desktop, see below:

Putty will ask you for your Crunchbang login and password. That's it! 

You can download from FTP, SFTP, SSH and more using WinSCP. It's an excellent free utility that if you don't already use it, you'll wonder how you did without it! It can even be driven from the Windows command line. For accessing Linux it is useful for accessing files.

Download WinSCP from here:
There is an installable version and also a handy portable exe you can store on a USB flash drive.

Double click the WinSCP icon
Click New
Enter the hostname (see above)
Enter your Crunchbang Linux username and password
Click Login

That's it! You'll connect to the Linux computer.

NOTE: You can use WinSCP to copy files to/from your Linux computer. However, using SSH it is slow. Instead, if you have a lot of files to copy, I'd recommend using Samba.


Post a Comment