SSH allows you to remotely access your system through command line on Linux. When I was visiting family, one of the things I wanted to do with their home system was enable SSH access so that I could remotely login from my home computer 500 miles away to do any needed maintenance or troubleshooting. I had become exhausted by trying to troubleshoot Ubuntu over the telephone when they where having simple problems. The issue is that I speak techno babble, particularly the Linuxese dialect, and the speak the Microsoftish dialect of the layman.  After I had them running with a basic desktop on Debian Lenny I did some research on SSH. The first thing to understand is the computer you wish to access with SSH is the host/server. The computer in which you are accessing the host/server is the Client. You first need to configure your host computer. The host needs to be running the SSH daemon.

sudo apt-get install openssh-server

you can edit the /etc/ssh/sshd_config file to indicate changes such as the port number to be used. This includes denying and granting access to specific users and groups. It is highly recommended to deny access to the user and group root:

DenyUsers root

DenyGroups root

if you wish to allow a specific user or group:

AllowUsers username

AllowGroups groupname

The user names and group names can be strung together and seperated by a space. Once finished save the file and exit. Restart the daemon

sudo /etc/init.d/ssh restart

Now your host server is completed and ready to be accessed from a remote computer. Use ifconfig to find your local network IP address, or alternatively you can use your that computer’s host. Generally Debian comes with the SSH client out of the box. You can double check to see if openssh-client is installed. To login to the host computer you use the ssh command and identify the user name and host:

ssh user@127.168.0.2

You will be prompted if you wish to continue connection (type yes) and then it will ask for the password for your user. Once succsessfully logined in you will be given a command line indicating the user and host name such as:

remote@fileserver:~$

Even though SSH sounds complicated, it is reletively easy to implement. There are varius configuration for tightened security one can try with SSH. One of the simplest security precautions is to change your port number in the /etc/ssh/sshd_config file. The SSH client will default to port 22. To specify a different port type:

ssh -p 188 remote@127.168.0.2

You are now ready to remote access your computer with SSH.

  • Share/Bookmark

Leave a Reply

Archives
Statistics
  • Pages displayed : 25720
  • Unique visitors : 14216
  • Pages displayed in last 24 hours : 58
  • Unique visitors in last 24 hours : 32
FireStats icon Powered by FireStats

Bad Behavior has blocked 86 access attempts in the last 7 days.

FireStats icon Powered by FireStats