RedAsh's Blog

Friday, March 21, 2008

 

SSH Recap

Secure Shell or SSH is a network protocol that allows data to be exchanged over a secure channel between two computers. Encryption provides confidentiality and integrity of data. SSH uses public-key cryptography to authenticate the remote computer and allow the remote computer to authenticate the user, if necessary.

SSH and TUNNELING
SSH is typically used to log into a remote machine and execute commands, but it also supports tunneling, forwarding arbitrary TCP ports and X11 connections; it can transfer files using the associated SFTP or SCP protocols.

An SSH server, by default, listens on the standard TCP port 22.

An SSH client program is typically used for establishing connections to an SSHD daemon accepting remote connections. Both are commonly present on most modern operating systems, including Mac OS X, Linux, FreeBSD, Solaris and OpenVMS. Proprietary, freeware and open source versions of various levels of complexity and completeness exist.
Uses of SSH

Example of tunneling an X11 application (xeyes) over SSH.SSH is most commonly used:

1. with an SSH client that supports terminal protocols, for remote administration of the SSH server computer via terminal (character-mode) console;
~ like SCSpring NetProtect and DigiSAFE.

2. in combination with SFTP, as a secure alternative to FTP which can be set up more easily on a small scale without a public key infrastructure and X.509 certificates;

3. in combination with rsync to backup, copy and mirror files efficiently and securely;
~ rsync is a software application for Unix systems which synchronizes files and directories from one location to another while minimizing data transfer using delta encoding when appropriate. An important feature of rsync not found in most similar programs/protocols is that the mirroring takes place with only one transmission in each direction. rsync can copy or display directory contents and copy files, optionally using compression and recursion.

In daemon mode, rsync listens to the default TCP port of 873, serving files in the native rsync protocol. rsync can also be used to synchronize local directories, or via a remote shell such as RSH or SSH. In the latter case, the rsync client executable must be installed on both the local and the remote host.

Released under the GNU General Public License, rsync is free software.


4. in combination with SCP, as a secure alternative for rcp file transfers;
~ Secure Copy or SCP is a means of securely transferring computer files between a local and a remote host or between two remote hosts, using the Secure Shell (SSH) protocol. The term SCP can refer to one of two related things, the SCP protocol or the SCP program.

5. for port forwarding or tunneling, frequently as an alternative to a full-fledged VPN. In this type of use, a (non-secure) TCP/IP connection of an external application is redirected to the SSH program (client or server), which forwards it to the other SSH party (server or client), which in turn forwards the connection to the desired destination host. The forwarded connection is encrypted and protected on the path between the SSH client and server only. Uses of SSH port forwarding include accessing database servers, email servers, securing X11, rdesktop, Windows Terminal Services and VNC connections or even forwarding Windows file shares. This is primarily useful for tunneling connections through firewalls which would ordinarily block that type of connection, and for encrypting protocols which are not normally encrypted (e.g. VNC);

6. for X11-forwarding for through multiple hosts;

7. for generally browsing the web through an encrypted proxy connection, using the SSH server as a proxy (with an SSH client that supports dynamic port forwarding);

8. for automated remote monitoring and management of servers;

9. for securely mounting a directory on the server as a filesystem on the local computer, using the SSH Filesystem;

10. as a full-fledged VPN;

How SSH uses public-key cryptography
First, a pair of cryptographic keys is generated. One is the private key, the other is the public key. As an analogy, they can be thought of as a matching private-key and a public padlock. The public padlock is what is installed on the remote machine and is used by ssh to authenticate users which use the matching private key. As a user of the system, you don’t care who can see or copy the padlock (ie the public key), since only the secret private key fits it. The private key is the part you keep secret inside a secure box that can only be opened with the correct passphrase. When the user wants to access a remote system, he opens the secure box with his passphrase, and uses the private-key to authenticate him with the padlock on the remote computer. Neither the passphrase nor the private key leave the user's machine. However, the user still needs to trust the local machine not to scrape his passphrase or copy his private-key while it's out of the secure box.

Comments: Post a Comment

Subscribe to Post Comments [Atom]





<< Home

Archives

May 2007   June 2007   July 2007   August 2007   September 2007   October 2007   November 2007   December 2007   January 2008   March 2008   April 2008   July 2008   August 2008   September 2008   October 2008   November 2008   December 2008   January 2009   February 2009   March 2009   April 2009   May 2009   June 2009   July 2009   August 2009   September 2009   October 2009   November 2009   December 2009   January 2010   February 2010   March 2010   April 2010   May 2010   June 2010   July 2010   August 2010   September 2010   October 2010   November 2010   December 2010   January 2011   February 2011   May 2011   June 2011   July 2011   August 2011   September 2011   October 2011   November 2011   December 2011   January 2012   February 2012   April 2012   May 2012   June 2012   July 2012   August 2012   September 2012   October 2012   December 2012   February 2013   July 2013   August 2013   November 2013   December 2017  

This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]