- OpenSSH for Windows: Is Cygwin Good Enough?
- Using Web Technologies as an SSH Replacement: A Feasibility Study
Using Web Technologies as an SSH Replacement: A Feasibility Study
This may sound like a foolish idea. After all, who would suggest spinning up so many webservers and installing so many command-line browser clients? But consider the work of your current SSH cross-platform implementation. Let’s imagine you decide to take the Cygwin risks. You must now install Cygwin on relevant systems. You must run the easy and efficient Cygwin update process to ensure the most secure OpenSSL libraries and OpenSSH binaries get installed. You must install the patched Cygwin.dll reliably as well. I see from the FAQ that the Cygwin Setup has several command-line options, so maybe we can schedule this as a timed task? If you’ve got a slick way to do this, comment on this article in the Comment section below, on Digg.com, or Slashdot, or the other Internet spots that have discussed my past articles
I’m a bit concerned that the Cygwin FAQ doesn’t seem to point out an easy way for me to install just the modules I need. I see a written recommendation that I download all packages and run them. This seems to go against a security fundamental that I only install that which I intend to use. According to this FAQ posting, I see some disturbing advice:
"The Cygwin Setup program is designed to be interactive, but there are a few different ways to automate it. If you are deploying to multiple systems, the best way is to run through a full installation once, saving the entire downloaded package tree. Then, on target systems, run setup.exe as a ’Local Install’ pointed at your downloaded package tree."
Maybe using web technologies isn’t doable? Maybe I need to install PuTTY (a truly excellent suite of SSH client tools) or under my strange plan, I need to install cURL, a truly excellent command-line browser that groks URLs? Any way I look at it, no matter how I provide SSH abilities, I’m installing software and must build maintenance processes.
Mapping SSH Abilities onto Web Abilities
So let’s go through each SSH fundamental and how web technologies will provide me that ability. I’ll state the general need and the way web technologies can meet that need.
We need both clients and servers.
Everyone has been web-ifying their platforms. A plethora of webservers are available, and a lot of them are inexpensive. These webservers work with their relevant platform’s security models beautifully. If you like, the Apache HTTP Web Server project supports many platforms, while working to ensure good compatibility with the underlying Operating System security model. You may be able to settle on a common webserver, depending on your platforms.
We need both interactive and command-line clients.
Browser technology is as pervasive as webserver versions. As in the case of webservers, some client browsers work on many platforms—here again, allowing for architecture consolidation. Need something command-line? In addition to cURL, many classes in Java, PERL, and the .NET Framework allow you the abilities you need.
We need encryption for communications.
Trade in the SSH protocols used for something as universal as SSL/TLS. This seems to be the most widely implemented encryption protocol, so getting support information and training should be easy. Is it secure? I’m not sure any encrypted channel is secure. I’m no cryptographer. Let me warn you that there are many, many articles that discuss the issues with encrypted channels.
Will a country’s encryption laws gut your channel’s effective cryptographic strength? Will you trust the endpoint’s identity, based on lame DNS entries provided by an organization that has had its domain stolen, through ancient BIND/DNS software, never updated from 8.22? No, as with all complex systems—SSH included—there are considerations. In a companion article on SSH security, I cover these considerations.
We need server authentication.
Let’s first explain the difference between digital keys and actual certificates. Digital keys are a tool that can be used to assert general identity. I’ll generate a digital keypair, then send you an email claiming this public key is me. Is the email faked? Ok, so instead I’ll post my public key on one of those "web of trust" servers—you know, one of those as being shown full of cross-site scripting security errors. No, keys themselves can provide many questions unless there is a set process for their creation, distribution, and revocation.
A digital certificate binds a specific set of digital keys to an identity, as verified by a Certificate Authority (CA). Many SSH distributions use digital keys only to mark the server. They will publish the footprint, hoping that there’s a way to recognize it as the legitimate keys are tied to a specific server. Sometimes administrators re-create keys. How do you communicate the new key fingerprint to users?
In this case, web sites using digital certificates from a reputable CA is an advantage. All those new key/new server interactions can be mapped into the CA operations. Most browsers can work with core CAs by default, and checking a revocation list is as easy as clicking a checkbox. Checking and asserting digital keys to any specific identity is much more difficult.
Currently, OpenSSH doesn’t seem to support authenticating servers through digital certificates. SSH Communications daemons can support digital certificates. I’ve heard rumors that OpenSSH is working towards this support. Anyone care to discuss this below?
Let’s be honest: These statements aren’t absolutes. Junk digital certificates that are issued by CAs are worthless. Also, browsers into which you insert junk certificates (as "trusted" by you forever and ever) are as misleading as anonymous digital keys a friend throws at you in a basic email. Maybe you’ve got a system that asserts identity reliably from digital keys? Some administrators often distribute updated ssh_known_hosts files and the like, to ensure the user never gets the security warning that a server’s key signature is unknown. Comment away below, but in the absence of super ideas, we must consider certificates an improvement on the use of digital keys alone.
We need client authentication that goes beyond passwords.
I do like SSH’s use of client digital keys for authentication. Passwords suck. They get stuck in plaintext scripts. They seldom change. They get to be public knowledge. They’re seldom complex enough to prevent guessing. Worst of all, they are difficult to use when scripting. I like SSH’s use of digital keys, but I also believe using client-side digital certificates via web authentication is a bit better. Done properly, there will be a CA asserting that a specific digital keypair represents me. The same security stipulations, provisos, and limitations I discuss in the previous section apply here as well.
Let me cover the key issue again—pun intended. I'm just troubled by one certain SSH issue: A new public key appears in my authorized_keys file (or equivalent administrative file or structure used in another SSH version).How do I track who gets to operate as me, with my privileges? As an average dumb user, am I likely to track my own key signature and likely to notice new ones popping up in the file?
We need SSH support of "forced commands."
These are nice! Imagine you need to run a limited maintenance script on devices. SSH allows you to bind an account to a specific script. This implements the security principle of least privilege quite nicely. In its place, we can bind accounts to set scripts in whatever scripting directory your webserver supports. This allows you to test your script very well and fix security holes—without offering a full shell/command access.
I can also limit and build a web account that has only file transfer or command execution access only, something not easily done with SSH technologies. I can even go so far as to create an account that is independent of the operating system’s accounts database. I can build an account that works in the web world only but can’t use FTP, Telnet, or even SSH itself—it can’t log on. This helps limit my system and application accounts to specific accesses and applications.
We need to support file transfers.
I’m really amazed that more organizations don’t use WebDAV servers. This technology moves files over HTTP or HTTPS protocols. It can be slower than FTP, similar to file transfer slowdowns seen with SSH.
We need to support interactive command sessions.
Many Java and other scripts provide interactive command-line access, using the encrypted TLS/SSL tunnel.
We need to support application forwarding abilities to force traffic into an encrypted tunnel.
Using Netcat, FPipe, and reverse-proxy technology, you can. But are you sure you want to do this? It is possible to "pipe" traffic into an HTTPS stream, to be sure. Is it reliable, though? The support and security nightmare that configuration produces can create real struggles, if all members of your organization aren’t in step with the decision to go that way. Issues include difficulty monitoring and troubleshooting problems. Some protocols may not work with address translations you may need to do. Other services create use a dynamically allocated port, and that has us up in arms... Here’s a possible scenario that illustrates what can happen if this decision isn’t discussed:
Helpdesk: We have a user who complains s/he can’t telnet to Server.intranet.org.Groggy Firewall On-Call Staff: Tell user to shove off; we don’t support Telnet from the Internet into the intranet.
So as you can see, we come ’round from whence we started: It is possible to re-create SSH risks with alternate technologies. SSH risks aren’t unique to SSH itself. And we must heed similar security warnings.
Dire Security Warnings
Allowing access from untrusted networks is risky, regardless of the technology you choose to use. Some interpret my articles on SSH as being against SSH—not so. The biggest risks come not from technology choices as much from unwise application practices, which include incomplete knowledge of how much access is truly granted by any system.
Sloppy security handling comes in a close second. Too many people undercut their organization’s security by choosing predictable passwords/passphrases or by placing them on yellow sticky notes. Whether you implement digital keys or digital certificates, both are worthless if you don’t secure their creation and distribution, or leave them in circulation forever. People who won’t secure the private key or choose a predictable passphrase ruin both systems. And last, too many people refuse to read and heed product warnings. Or as my friend TEJ once told me, "RTFM!" (universally known as "Read the Fine Manual").
In my limited view, IT workers are asked to support multiple platforms and create a means to transfer files and run commands across all platforms (no pressure on us, huh?). These brave, overworked souls may find web technologies a better fit and cheaper alternative. I also believe when the cost of commercial products is balanced by the labor hours spent implementing a mix of web technology solutions, the commercial SSH alternatives may not be as expensive as initially thought. What is your view? Is there a solid OpenSSH daemon for Windows, one with long-term support by several people? Share your thoughts in the "Make a New Comment" section below.