public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Paul Hartman" <paul.hartman+gentoo@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] SSH login with both key AND password?
Date: Thu, 8 Jan 2009 10:57:15 -0600	[thread overview]
Message-ID: <58965d8a0901080857q1e004496ida87338c105b3bf1@mail.gmail.com> (raw)
In-Reply-To: <496544CC.5050300@xs4all.nl>

On Wed, Jan 7, 2009 at 6:11 PM, Dave Jones <Dave.Jones@xs4all.nl> wrote:
> Paul Hartman wrote on 08/01/09 00:28:
>> Hi,
>>
>> Normally I'm using SSH with regular password login, and I've read
>> about generating a keypair and having a password-less connection that
>> way. Is there a way to require both the key AND a password? Basically
>> if I put the key in my SSH client at work, I don't want a co-worker to
>> be able to login to my home PC, or someone to grab my phone, etc.
>>
>> Is there a way to put a passphrase on the key (seperate from my user
>> account password)? Maybe that would work... Otherwise I've thought
>> about having a dummy SSH account and then "su - realuser" to get
>> access, but that seems kind of messy.
>>
>> I've always used password login and IP-restricted it, but now I'm
>> traveling more and never know what IP I might be connecting from, so
>> using a key seems to be the best plan, or maybesome kind of
>> portknocking (but that's difficult from restricted ssh environments
>> such as a phone).
>>
> By default ssh-keygen creates a key pair with a passphrase. It's your choice to enter or omit a passphrase.
>
> If you've generated a key without a passphrase, you can add a passphrase using ssh-keygen -p
>
> Entering a passphrase encrypts the private part of the key, which you keep only on the server. You only need the public part of the key on the client.
>
> Cheers, Dave

It works great. Thanks everyone for your responses!

Paul



  parent reply	other threads:[~2009-01-08 16:57 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-07 23:28 [gentoo-user] SSH login with both key AND password? Paul Hartman
2009-01-07 23:45 ` [gentoo-user] " Nikos Chantziaras
2009-01-08  0:01   ` Paul Hartman
2009-01-08  0:11     ` Norberto Bensa
2009-01-08  0:25       ` Dave Jones
2009-01-08  0:11 ` [gentoo-user] " Dave Jones
2009-01-08  2:44   ` Shawn Haggett
2009-01-08  4:19     ` [gentoo-user] Problem with resolv.conf Hung Dang
2009-01-08  4:24       ` KH
2009-01-08  4:29         ` Eric Martin
2009-01-08  4:26       ` Eric Martin
2009-01-08  4:47         ` Hung Dang
2009-01-08  9:46           ` Redouane Boumghar
2009-01-08 16:45       ` [gentoo-user] " »Q«
2009-01-09  3:20         ` Hung Dang
2009-01-08 11:28   ` [gentoo-user] SSH login with both key AND password? Norberto Bensa
2009-01-08 16:57   ` Paul Hartman [this message]
2009-01-08 18:12     ` Paul Hartman
2009-01-08 20:57       ` Paul Hartman
2009-01-08 23:26         ` Eric Martin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=58965d8a0901080857q1e004496ida87338c105b3bf1@mail.gmail.com \
    --to=paul.hartman+gentoo@gmail.com \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox