Slashdot Mirror


Kerberos Support In OpenSSH

Dan writes "Marshall Vale writes on behalf of the MIT Kerberos team and several other parties interested in the availability of Kerberos authentication for the SSH protocol. Kerberos is a network authentication protocol. It is designed to provide strong authentication for client/server applications by using secret-key cryptography. Marshall says that Kerberos support within OpenSSH may be incomplete and needs more work. In particular, implementing draft-ietf-secsh-gsskeyex in addition to any other Kerberos mechanisms will better serve the needs of Kerberos community. Secondly, he says that they would like to reduce user confusion associated with all of the different options for Kerberos and SSH. He suggests adoption of the GSSAPI key exchange mechanism in the IETF draft (which uses Kerberos to authenticate both parties to each other), in order to avoid man-in-the-middle attacks."

53 of 122 comments (clear)

  1. RSA? by paranode · · Score: 3, Insightful

    Is there any advantage to using this over the already-usable RSA key authentication in SSH?

    1. Re:RSA? by Mark+Bainter · · Score: 5, Insightful

      Yes. Scenario: 500 *nix servers, team of 10 administrators. Solution 1: Each user gets a login created on each machine, and then they login, create an ssh key, and distribute the public key to all other machines. Later, when that person leaves, all those keys and all those user accounts get deleted. (Given, you could use NIS/LDAP/etc to try and alleviate the user-account side of the issue. But you didn't mention that as part of your RSA solution, and note that each of these solutions has potential inherent security problems.) Solution 2: Setup kerberos. Authenticate all users for all machines securely from one location. Add and delete user accounts from one location.

      --
      "No nation could preserve its freedom in the midst of continual warfare."
      --James Madison
    2. Re:RSA? by hbo · · Score: 5, Informative

      The main advantage of using Kerberos for key exchange is the elimination of the known_hosts file, and the tendency for ssh users to accept any
      old key offered by the server the first time they connect. This common behavior exposes the user to the risk of man-in-the-middle attacks. If I've tricked your stack into connecting to me instead of the host you thought you were getting, I can spoof both ends of the connection and intercept your traffic in the clear. Also, Kerberos authentication is two-way (server to client AND client to server)

      --

      "Even if you are on the right track, you'll get run over if you just sit there" - Will Rogers

    3. Re:RSA? by coyote-san · · Score: 2, Informative

      Yes. Many of them.

      SSH is great for what it does, but it really doesn't do that much. Most people don't notice this since they don't need it to do much - for them it's just a better telnet.

      But it scales horribly, look at the other comments.

      Worse, SSH drops authentication information. This doesn't sound like much until you've worked in an environment where clients and servers can perform mutual authentication "beneath the surface," but once you have going back is painful.

      --
      For every complex problem there is an answer that is clear, simple, and wrong. -- H L Mencken
    4. Re:RSA? by The+Vorlon · · Score: 4, Informative

      If you're deploying SSH in an environment that already uses Kerberos, there absolutely is an advantage. GSSAPI external key exchange means that, if you're authenticated to the Kerberos realm, you have tickets that will let you connect to any other machine in the realm (or in a trusted realm) without having to do out-of-band verification of the RSA key's fingerprint.

      With traditional RSA key authentication in SSH, the security of the SSH connection requires that either the user is diligent enough to check every new RSA fingerprint when it pops up, or that the site admin has stored all of the machine fingerprints in /etc/ssh/ssh_known_hosts. With Kerberos, mutual authentication is done for you. This is a very big advantage for anyone with a lot of machines, particularly if Kerberos is in use anyway.

    5. Re:RSA? by yandros · · Score: 2, Informative

      Kerberos is used (although not as uniformly as might be wished) in a few decent remote filesystems as well. This can be a real boon for such setups (which should be more common, IMHO). Without it, you can get a secure login to a remote machine, but still need to provide that machine with an authenticator for secure network services (such as afs, nfs, ftp, imap, etc.).

      At MIT, at least a year or two back, we had people using a mixture of ssh and kerberized rlogin just to deal with the ticket-forwarding issues.

    6. Re:RSA? by More+Trouble · · Score: 2, Insightful
      Solution 2: Setup kerberos. Authenticate all users for all machines securely from one location. Add and delete user accounts from one location.


      Depends what you means by "accounts". Any way you look at it, you'll want to set up something like LDAP for distributing the equivalent of /etc/passwd data. Kerberos gives you user authentication, and the ability to disable user accounts globally -- though not within the ticket lifetime! Kerberos doesn't give you much in the way of provisioning accounts, which is what your statement implies.

      :w

    7. Re:RSA? by More+Trouble · · Score: 2, Interesting
      The main advantage of using Kerberos for key exchange is the elimination of the known_hosts file, and the tendency for ssh users to accept any old key offered by the server the first time they connect. This common behavior exposes the user to the risk of man-in-the-middle attacks. If I've tricked your stack into connecting to me instead of the host you thought you were getting, I can spoof both ends of the connection and intercept your traffic in the clear.


      Sadly, recent implementations of MIT Kerberos automatically reverse DNS names. So, if I can spoof the user's target DNS name to point to my blackhat machine, the Kerberos libraries will cheerfully reverse my IP address to get the Kerberos principle for authentication.

      :w

    8. Re:RSA? by Wolf+Eyelash · · Score: 2, Informative

      Sadly, recent implementations of MIT Kerberos automatically reverse DNS names. So, if I can spoof the user's target DNS name to point to my blackhat machine, the Kerberos libraries will cheerfully reverse my IP address to get the Kerberos principle for authentication.

      But what does that buy you? I assume that a KDC must encrypt part of it's reply with the host principal's secret key that must also be stored and read from a local keytab file that typically only root can update. How can you spoof this part of the validation?

  2. ssh and telnet by ih8apple · · Score: 3, Interesting

    To avoid moronic passwords being captured over cleartext telnet or ftp sessions, I think telnet and ftp should be disabled across the world with very limited exceptions. All UNIX and Linux distros should have cleartext protocols disabled by default. Once one account is comprised, the rest of a system usually goes very easily. Regardless of adding Kerberos support in OpenSSH, any kind of ssh or sftp connection immediately improves the worldwide crackability situation. (and yes, I just made up the word crackability=ease of access for crackers)

    1. Re:ssh and telnet by Anonymous Coward · · Score: 2, Insightful

      We'd also better disable ESMTP and POP3 too. You don't mind waiting for your mail while we write a secure replacement, do you?

    2. Re:ssh and telnet by Surak · · Score: 4, Insightful

      Secure IMAP with Kerberos support. :-P

    3. Re:ssh and telnet by lysander · · Score: 3, Informative

      there exists kerberos authenticated SMTP and also kerberos authenticated POP (KPOP). both are in use at MIT, but the former is a relatively new service.

      --
      GET YOUR WEAPONS READY! --DR.LIGHT
    4. Re:ssh and telnet by jarkko · · Score: 5, Insightful

      All UNIX and Linux distros should have cleartext protocols disabled by default.

      I still use telnet, ftp and even rsh as well and I don't feel insecure about it. Transport-mode IPSec between hosts really helps a lot here...

      The "moronic passwords"-issue comes mainly from pop3 and different web-sessions these days. What the world really needs is opportunistic IPSec.

    5. Re:ssh and telnet by isa-kuruption · · Score: 5, Insightful

      I will paraphrase a quote from Mr Bruce Schneier:

      "No matter what security measures you implement, the end users are still the weakest link in the chain."

      I think it speaks for itself. Passwords can be brute forced via secure protocols as well. Passwords can be copied from stick-it notes on people's monitors, or from knowing their maiden name.

      While cleartext protocols should be disabled, many places use them... a LOT. And while I know SSH can replace most of their functionality, many places have scripts that have been running for years that would need man power to rewrite (even if changing only one line) which makes it difficult for many organizations decide this is a priority.

      Heck, I had a hell of a time convincing our organization to move from SSHv1 to SSHv2 due to the man-in-the-middle attacks.

    6. Re:ssh and telnet by sporty · · Score: 2, Funny

      Crackability. Sounds like a word nabisco would use.

      "Ritz.. now with more crackability." /bored

      --

      -
      ping -f 255.255.255.255 # if only

    7. Re:ssh and telnet by Anonymous Coward · · Score: 2, Informative

      Absolutely agreed.

      From what I've seen, the main reason people use telnet etc. is simply because it's enabled by default. They are too clueless to install SSH (and often too clueless to enable telnet if it were disabled), sometimes they haven't even heard of it.

      Many open source OS distributions (at least the *BSDs, probably most if not all Linux distributions) already include SSH and disable almost everything in inetd.conf by default.

      MacOS X also includes (but doesn't enable) SSH and disables everything in inetd.conf, and only makes SSH easy to enable (checkbox in the system configuration app).

      But Solaris, HP-UX, AIX, Tru64...no such luck (disclaimer - I haven't looked at the most recent versions of some of those systems).

    8. Re:ssh and telnet by ave19 · · Score: 3, Insightful

      Would it be more accurate to say, you wish to see all cleartext services disabled by default? Since ftp, telnet, rlogin, etc. all have ciphered, non-cleartext authentication methods with mutual authentication?

      Where I work, we allow kerberized telnet, but not cleartext telnet. Same for ftp.

      -ave

      --
      ...or maybe not.
    9. Re:ssh and telnet by killmenow · · Score: 2, Informative
      What the world really needs is opportunistic IPSec.
      Done.
    10. Re:ssh and telnet by iabervon · · Score: 3, Insightful

      You really mean cleartext authentication, not cleartext protocols. Cleartext ftp is fine for anonymous downloads; cleartext HTTP is fine so long as you don't use passwords or authentication cookies (note that you and I are both posting in violation of what we're saying. But anyway...); cleartext telnet is fine for rainmaker.wunderground.com; and so forth.

      I find it odd that systems package together telnet (a nice wrapper for TCP, with a few extra features; very useful for a number of things, including getting the weather) with telnetd (a program for providing shell access to attackers, simply based on the few extra features over TCP. Similarly ssh and sshd. Programs that make connections are very different from programs that provide shell access.

      Personally, I think Linux distros should have remote login disabled by default. Anyone who actually wants it will know how to enable it, and will hopefully pick a sane protocol to use to do so.

    11. Re:ssh and telnet by noahm · · Score: 2, Informative
      Part of what you need in a security system is a guarantee that a communications session will be encrypted. Without that guarantee, you can not trust the connection. Opportunistic IPsec does not provide you with any guarantee that communication with a given host is encrypted. If possible, it will be, but it just as well may not.

      One must understand the rationale for developing opportunistic encryption. It is not to provide for secure communication. It exists to clog the spooks' sniffers with as much unusable data as possible. There is a distinction there. Yes, for the purposes of the data contained within that IPsec payload the result is the same, but users would be absolutely insane to switch from ssh to telnet+opportunistic IPsec and expect the same level of protection.

      IPsec in general is a very different story, and something that I use extensively in production.

      noah

    12. Re:ssh and telnet by oddityfds · · Score: 2, Informative

      There's KRB5/GSSAPI/IMAP support in Ximian Evolution nowadays. You need version 1.2.4 or later. It's enabled in the binaries for RHL9 from Ximian. A nice single-sign-on mail solution for sites with a Kerberos infrastructure.

  3. Re:Time for Linux to catch up? by tempmpi · · Score: 4, Insightful

    Linux has had Kerberos and IPSec for long time, too. This is not a Linux vs. Windows thing, it is about the best way to use Kerberos authentification for SSH.

    --
    Jan
  4. Re:Time for Linux to catch up? by axxackall · · Score: 2, Informative
    Forever? Do you mean since Win2k?

    By the way, I've been using Kerberos in Slackware Linux in 1996. Does it fell to your definition of "forever"?

    --

    Less is more !
  5. Re:Time for Linux to catch up? by coyote-san · · Score: 4, Informative

    Moderators on crack again?

    Unix systems have had Kerberos forever, via both commercial implementations and the MIT reference implementations. Linux DISTRIBUTIONS largely haven't had them, but that's because of the hassles with US export controls in place until recently. Anyone likely to use Kerberos also knew how to build the MIT reference implementation from scratch, if necessary.

    Windows is actually a "Johnny-come-lately" - I had been working on unofficial Debian packages of the MIT Krb5 packages for about 3 years when MS announced Windows would use Kerberos in new products, and as usual they attempted to add their own unpublished proprietary crap to it. I (and many other people) didn't mind them adding add'l field specific to the W2K client model, but there was no need for the initial draconian non-disclosure policies.

    --
    For every complex problem there is an answer that is clear, simple, and wrong. -- H L Mencken
  6. Re:Goatse Receiver, ass contortionist, dead at 55 by Anonymous Coward · · Score: 2, Funny

    it would be funny if there was a goatse article on slashdot, and all the goatse trolls were on topic.

  7. Windows 2K/XP and KErberos by tigersha · · Score: 4, Interesting

    IS is possible to log in to an Active Directory Domain and use those credntials for Kerberos. I am not an expert on this but AFAIK Microsft uses a somewhat bastartized version of Kerberos for Active Directory. I am interested in tusing thos tickets to authenticate with Normal SSH (the Windows version from SSH Labs) from my Windows box. Is this possible?

    --
    The dangers of excessive individualism are nothing compared to the oppressiveness of excessive collectivism
    1. Re:Windows 2K/XP and KErberos by Anonymous Coward · · Score: 3, Informative

      I believe recent Kerberos for Windows distributions from MIT include ms2mit.exe, which you can use to do that conversion.

      MIT has single-signon working (the conversion happens automatically) but I don't know if they released the code.

    2. Re:Windows 2K/XP and KErberos by Anonymous Coward · · Score: 2, Informative

      Yes, Non-MS kerberos systems will ignore the MS data in the Kerberos ticket and accept it as authentication if you are part of a Kerberos realm that uses a MS KDC. For example, OS X can use an Active Directory server as a KDC and pass the TGT to a cyrus IMAP server. The IMAP server will ignore the MS junk in the ticket and as long as you check out, you can get your mail. The problem is going the other way. You cannot, get a TGT from a MIT KDC and pass it to a MS Kerberized service.

  8. Other parties? by Nissyen · · Score: 5, Funny
    ...on behalf of the MIT Kerberos team and several other parties interested in the availability of Kerberos authentication...

    There are other parties interested in Kerberos?

    1. Re:Other parties? by finkployd · · Score: 3, Informative

      There are other parties interested in Kerberos?

      Yeah, most large Universities.

      Finkployd

    2. Re:Other parties? by azimir · · Score: 2, Insightful

      Yes, the OpenAFS guys use it for authenticating users of AFS mounts. Getting Kerberos working is vital to a third-party ticket/key/token/whatever system right now.

  9. Re:Well that's a start ... but ... by Spyder · · Score: 3, Informative

    Yes it is BSD, it's an OpenBSD project.

    --
    Spyder
  10. kerberos+ssh+putty by ave19 · · Score: 5, Informative

    i have a mod for putty that can do gssapi+kerberos auth for users. windows client to the linux/unix openssh servers.

    we're beta testing (or will start soon) but it works!

    respond if you're interested...

    --
    ...or maybe not.
    1. Re:kerberos+ssh+putty by ave19 · · Score: 2, Interesting

      Okay, I made a throw away email address for this. Send me a note and I'll hook you up the best I can:

      kputty@jaccard.us

      Thanks!

      --
      ...or maybe not.
  11. Re:ssh and telnet, sftp and ftp by Endareth · · Score: 3, Insightful

    I think telnet and ftp should be disabled across the world with very limited exceptions. All UNIX and Linux distros should have cleartext protocols disabled by default.

    I would agree 100% with this, some *NIX flavours do this already, notable NetBSD and OpenBSD, and I suspect FreeBSD does also, though TBH that's guessing. With SSH available there really is no need that I can think of off hand (I'm sure someone can think up a counter argument) for telnet to still exist, and the only reason for plain ftp to still exist is because all those fully featured ftp clients (download managers, resumers, etc) are implemented with plain ftp instead of sftp. If they are well enough written however, it shouldn't take much effort to re-write these to use sftp instead. While Kerberos is a definate improvement, the difference between telnet and SSH is far huger than the difference between SSH without Kerberos and SSH with Kerberos.

    --
    Disclaimer: The above comment was made while under the influence of too much coding and not enough sleep.
  12. AFS token forwarding for SSHV2? by dpilot · · Score: 2, Interesting

    Does this mean we might get afs token forwarding for SSHV2? (I actually *read* the article, and couldn't glean that out of it.) Currently it appears to be possible to get afs token forwarding, but only for SSHV1. Proper token forwarding would enable ssh deployment in an afs shop.

    Or with Kerberos authentication does token forwarding no longer matter, because it's not needed?

    --
    The living have better things to do than to continue hating the dead.
  13. Re:ssh and telnet - POP3 by drasfr · · Score: 4, Informative

    Well, Pop3 can be fairly secure, pop3 over ssl.

    I have my own SMTP & pop3 server, and I have compiled my POP3 daemon with ssl support, and I use outlook to connect, securely on pop3, at least no cleartext password exchange there.
    Althought it doesn't change anything in the man-in-the-middle problem.
    One problem only, as the SSL certificate has been signed by myself, when outlook reconnect to the server first time it is run, it says the certificate is unknown.

  14. Advantage? by quantum+bit · · Score: 2, Interesting

    So exactly what advantage does this have over

    rlogin -x $HOSTNAME

    ? I'm talking about the Kerberized rlogin, of course (possibly known as krlogin to some of you linux users). The -x means to force encryption of the entire session.

  15. Re:Time for Linux to catch up? by ave19 · · Score: 2, Informative

    kerberos authentication via gssapi in openssh was available in linux before it was available in windows. i know, cause i did some of the work.

    --
    ...or maybe not.
  16. Globus Grid Support too! by Zach+Garner · · Score: 2, Informative

    OpenSSH has also been modified to support the Grid Security Infrastructure (GSI) used by Globus.

  17. Isn't this old? by Tony+Hoyle · · Score: 2, Informative

    The ssh-krb5 package has been in debian for, well, years... it works OK .. ironically I'm ditching kerberos soon because it's a lot of hassle, since the token keeps expiring at precisely the wrong moment just as I want to do something, plus it's difficult to switch users since you can only have one ticket at a time - PKI with forwarding is a lot easier.

  18. There is already a patch by voicebox · · Score: 5, Informative

    I am unable to get to the article (slashdotted) but there is an already existing GSSAPI patch for OpenSSH here: patch.

  19. The previous flamefest over this.. by Tuck · · Score: 4, Informative
    --
    $ find /pub -beer "James Squire Amber Ale" -drink
  20. it's been there for a while by uslinux.net · · Score: 4, Informative

    Kerberos authentication has been in openssh for a while, IIRC. What openssh lacks is kerberos ticket passing. Authentication works by validating your kerberos ticket against a KDC, or validating your password against the KDC. #2 has been there. I believe #1 has as well. Ticket passing allows your ticket to be forwarded to the next server, so you can *again* login in to another system. If you don't pass tickets, you need to kinit on each system before you can ssh.

    And BTW, kerberos 5 sysadmins can disable non-encrypted services, so rsh/rlogin/telnet/ftp/etc can mandate encryption or fail the connections.

  21. next step by scrytch · · Score: 2, Informative

    Now all they have to do is make Kerberos as easy to install as openssh. Last time I had to deal with kerberos, it was like removing my own spleen. And it never even worked well when I used it -- like most other MIT standards, it was a pig and had an archaeic interface. And the expiration mechanism still sucks.

    --
    I've finally had it: until slashdot gets article moderation, I am not coming back.
  22. Cussed out in Klingon by sdjunky · · Score: 3, Funny

    "draft-ietf-secsh-gsskeyex"

    Yeah! Well, your mother!

  23. Ahh, yes.. draft-ietf-secsh-gsskeyex.. by RubberChainsaw · · Score: 2, Funny

    ..implementing draft-ietf-secsh-gsskeyex in addition to ..

    Ahh yes. draft-ietf-secsh-gsskeyex.
    Encryption so secure you need a key just to decipher the name!

    :)

    --
    I welcome our new 99% overlords.
  24. Man-in-the-middle by smallpaul · · Score: 2, Insightful

    I often hear about man-in-the-middle attacks in theory but I've heard of one in practice. Can someone point me to some documentation about an incident where data was compromised by a MITM?

  25. Re:ssh and telnet, sftp and ftp by autechre · · Score: 2, Interesting

    I know that telnet is still necessary in some settings due to legacy accounting systems (the particular one I have in mind is by HP, IIRC) that simply don't have a replacement. It can also be used to remotely configure some printers and routers, which shouldn't be accessible (via login) from the outside anyway.

    The telnet client can also be used as a diagnostic tool, though netcat is better.

    --
    WMBC freeform/independent online radio.
  26. Big win for government by morrison · · Score: 2, Interesting

    This is great news for government sites/labs where Kerberos with pre-hardware authentication (SecureID) is standard or even mandated. As it is, many sites have to remove the existing ssh installation, only to install a custom Kerberized version of ssh.

    (e.g. http://kirby.hpcmp.hpc.mil/)

    Having Kerberos in the default install should ease one of the many headache's government sysadmins have to endure.

    --
    Cheers!
    Sean
  27. Yes SCO now owns Kerberos by Anonymous Coward · · Score: 2, Funny

    Since Kerberos was clearly developed with intent to run on the Unix platform, it is therefore a "derivative work" of Unix, and hence automatically becomes the Intellectual Property of SCO. You can be certain SCO is now *very* interested in the matter.

  28. Re:Binary-only restrictions by linefeed0 · · Score: 2, Informative
    I'm not sure about other methods, but if you use Wilkinson's GSSAPI patch with credentials delegation enabled, krb5 TGTs will be forwarded when the user authenticates with krb5/gssapi.

    The problem is that the current version of OpenSSH does an aklog with krb4, which may or may not work without additional patching (i.e. changing the aklog code to use krb5) depending on how your sshd handles the krb libs.