LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-22-2013, 09:52 AM   #1
jonaskellens
Member
 
Registered: Jul 2008
Location: Ghent, Belgium
Distribution: Fedora, CentOS
Posts: 632

Rep: Reputation: 33
SSH : get password protection back after copy key


Hello,

after having copied my private key to another location, I no longer get the password prompt.

How can I get it back to password protected ?

When I search, I get a lot of answers to get a password-less solution. I want the opposite.
 
Old 01-22-2013, 10:05 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,331
Blog Entries: 55

Rep: Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530
Quote:
Originally Posted by jonaskellens View Post
after having copied my private key to another location, I no longer get the password prompt.
That is a Good Thing.


Quote:
Originally Posted by jonaskellens View Post
I want the opposite.
Can't you use ssh-agent? What is the real problem?
 
Old 01-22-2013, 10:07 AM   #3
shivaa
Senior Member
 
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,800
Blog Entries: 4

Rep: Reputation: 286Reputation: 286Reputation: 286
Copiend or moved?

Do you have following file in your home directory?
Code:
~/.ssh/id_dsa
In order to have a password less login you need to generate your private keys, and update it into remote systems authorized_keys file.
So once check remote system's ~/.ssh/authorized_keys file and remove your entry (+key) and then try to login. It should then ask your to login with your normal login password.

Last edited by shivaa; 01-22-2013 at 10:08 AM.
 
Old 01-22-2013, 10:14 AM   #4
jonaskellens
Member
 
Registered: Jul 2008
Location: Ghent, Belgium
Distribution: Fedora, CentOS
Posts: 632

Original Poster
Rep: Reputation: 33
Hello,

I copied my key to an external stick and then onto my new Fedora HP laptop.

I do not have this key in my home folder. I have it stored in another location.

I used to have a password prompt on my fedora. Once I gave the password, my key was unlocked and I could use my key on all my servers without having to give the password on the CLI.

Now everytime I connect to one of my servers, I need to give the password on the CLI.

I would like to have the password window back to unlock the key and login to all my servers without having to repeat the password on the CLI.

Last edited by jonaskellens; 01-22-2013 at 10:16 AM.
 
Old 01-22-2013, 07:18 PM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
It sounds like you're asking about the (optional) passwd that protects access to a key locally, not the passwd to login remotely to a system (instead of using auth-keys).
For ssh to work, the key must be in the default location; then when you use it, it will ask for the passwd to unlock the key.
 
Old 01-23-2013, 02:57 AM   #6
jonaskellens
Member
 
Registered: Jul 2008
Location: Ghent, Belgium
Distribution: Fedora, CentOS
Posts: 632

Original Poster
Rep: Reputation: 33
Quote:
Originally Posted by chrism01 View Post
It sounds like you're asking about the (optional) passwd that protects access to a key locally, not the passwd to login remotely to a system (instead of using auth-keys).
Correct ! Can I get this back ?

Quote:
Originally Posted by chrism01 View Post
For ssh to work, the key must be in the default location; then when you use it, it will ask for the passwd to unlock the key.
I just use the -i flag of the ssh-command to point to the location of the key... This works fine!
 
Old 01-23-2013, 07:00 AM   #7
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,331
Blog Entries: 55

Rep: Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530
Like chrism01 already said for SSH to work the key must be in the default location. You should indicate you followed that advice or not. And wrt password / pass phrase that can still be two things IMO: the users default wallet or the graphical ssh-askpass client.
 
Old 01-23-2013, 09:25 AM   #8
jonaskellens
Member
 
Registered: Jul 2008
Location: Ghent, Belgium
Distribution: Fedora, CentOS
Posts: 632

Original Poster
Rep: Reputation: 33
I never used ssh with keys in default home .ssh-folder. I always use the -i flag to indicate where the key is located.

But never mind. I'm checking out gnome-keyring now to get the protection for my key that I want.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
HDCP 'master key' supposedly released, unlocks HDTV copy protection permanently Jeebizz Linux - News 0 09-14-2010 10:18 PM
SSH public key or password bortek Linux - Security 7 03-16-2010 07:38 PM
SSH key and/or password daghenningsorbo Linux - Networking 2 02-20-2010 03:31 PM
force ssh to use key AND password frznchckn Linux - General 1 05-05-2009 02:55 PM
how to use of ftp in linux to copy ssh pub key to another host raj_hcl1986@rediffma Linux - Newbie 1 11-04-2008 05:24 PM


All times are GMT -5. The time now is 01:00 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration