The Best Multiplatform Development Environment that Ever Lived on One Box
There are two versions of the SSH protocol: 1 and 2. I am using version 2 of the protocol (sometimes simply called SSH2). SSH (secure shell) gives me three advantages from a security standpoint:
High degree of authentication security using public key authentication
High degree of transmission security by encrypting all traffic after authentication
Encrypted TCP tunneling for connection to services not available to the public (often referred to as VPN or virtual private networking)
Public key authentication works through the use of a public key and a private key. A key in this context is a string of characters used to identify an individual. Keys can be a variety of lengths. The longer the key, the harder it is to break, but performance in the encryption and decryption process can suffer with longer keys. Usually a tool, such as ssh-keygen, is used to generate key pairs. Information encrypted with the private key can only be decrypted with the public key. Likewise, information encrypted with the public key can only be decrypted with the private key.
Once keys have been generated, they can be used in secure connections with SSH. The private key (as its name implies) should be kept secure at all times. Often it is kept on a floppy disk or other removable media when other people may have access to a machine you also use (I keep mine on a Java powered ibutton, but that is another story). The public key, however, may be distributed, well, publicly. A copy of the public key must be present on the remote server that you wish to connect to using SSH.
When you attempt to make a connection with SSH, a small bit of information is encrypted using your public key on the server. This information is called the session key. The SSH server on the remote machine sends the encrypted session key back to the client. The client then attempts to decrypt this bit of information using your private key. This information (once successfully decrypted) is then used to encrypt the rest of the session. This solution is simple and elegant. The information used later on to encrypt the rest of the session is never passed in cleartext over the insecure Internet.
One of the most powerful features of SSH is the ability to use TCP tunnels. There are two types of tunnels: local and remote. With a local tunnel, you specify a port for your local machine to listen on, as well as a remote machine and port on the other side of your SSH connection to connect to. Once a local tunnel is established, you can connect to the specified port on your local machine, and it will be as if you had connected to the remote machine on the port you specified for the tunnel. With remote tunnels, you specify a port for the remote machine to listen on and a local address and port to connect to. When a connection is made to the specified port on the remote machine, it will be as if the connection had been made to the local machine and port you specified for the tunnel. The way these connections work is not always understood, so let's take two examples from my own configuration file:
LocalForward "5521:localhost:1521" RemoteForward "6010:localhost:6000"
On the Linux box I run a database server. I want to be able to use the client tools remotely, but in a secure way. The listener service is bound to port 1521. In the first example above, the first parameter (5521) is the port that my local machine will listen on. The second and third parameters refer to the remote machine. So, localhost in this case is the remote machine's localhost. After establishing my secure shell session, the tunnels are automatically created from the configuration file. I can then point the client tools to my local machine at port 5521. All traffic generated by the client tools will transparently be forwarded over the secure tunnel to the remote machine.
The second example uses the X Window System over a secure tunnel. Without getting into too much detail, X is somewhat counter-intuitive; you run an X server on your local machine, and X clients are run on the remote machine. These clients connect to the X server. X has a notion of display numbers bound to ports. Display 0 uses port 6000, display 1 uses 6001 and so on. In the second example above, the first parameter (6010) refers to the port on the remote machine. In this case, I am using display 10, bound to port 6010, to run my X clients. The second and third parameters refer to my local machine. So, localhost in this case is my machine's localhost. On the remote machine, I might run a command like:
xterm -display localhost:10&
This will cause xterm to connect to port 6010, which will transparently connect through the secure tunnel to my machine on port 6000 (the default port for the X server).
In actuality, SSH supports automatically tunneling X clients.
Since the tunnel is established through an already secure connection, all information passing along the tunnel is encrypted. The upside is a high degree of security over a public and insecure network. The downside is overhead in encrypting everything on the fly.
Fast/Flexible Linux OS Recovery
On Demand Now
In this live one-hour webinar, learn how to enhance your existing backup strategies for complete disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible full-system recovery solution for UNIX and Linux systems.
Join Linux Journal's Shawn Powers and David Huffman, President/CEO, Storix, Inc.
Free to Linux Journal readers.Register Now!
|CentOS 6.8 Released||May 27, 2016|
|Secure Desktops with Qubes: Introduction||May 27, 2016|
|Chris Birchall's Re-Engineering Legacy Software (Manning Publications)||May 26, 2016|
|ServersCheck's Thermal Imaging Camera Sensor||May 25, 2016|
|Petros Koutoupis' RapidDisk||May 24, 2016|
|The Italian Army Switches to LibreOffice||May 23, 2016|
- Secure Desktops with Qubes: Introduction
- Download "Linux Management with Red Hat Satellite: Measuring Business Impact and ROI"
- Chris Birchall's Re-Engineering Legacy Software (Manning Publications)
- The Italian Army Switches to LibreOffice
- Linux Mint 18
- CentOS 6.8 Released
- Petros Koutoupis' RapidDisk
- ServersCheck's Thermal Imaging Camera Sensor
- Oracle vs. Google: Round 2
- The FBI and the Mozilla Foundation Lock Horns over Known Security Hole
Until recently, IBM’s Power Platform was looked upon as being the system that hosted IBM’s flavor of UNIX and proprietary operating system called IBM i. These servers often are found in medium-size businesses running ERP, CRM and financials for on-premise customers. By enabling the Power platform to run the Linux OS, IBM now has positioned Power to be the platform of choice for those already running Linux that are facing scalability issues, especially customers looking at analytics, big data or cloud computing.
￼Running Linux on IBM’s Power hardware offers some obvious benefits, including improved processing speed and memory bandwidth, inherent security, and simpler deployment and management. But if you look beyond the impressive architecture, you’ll also find an open ecosystem that has given rise to a strong, innovative community, as well as an inventory of system and network management applications that really help leverage the benefits offered by running Linux on Power.Get the Guide