LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 07-28-2019, 09:51 PM   #1
schnappi
Member
 
Registered: Apr 2017
Posts: 52

Rep: Reputation: 3
Automatically load password protected SSH key on login


Is there a way to automatically load a password protected SSH key without running ssh-add and typing the password?
 
Old 07-28-2019, 09:55 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,403
Blog Entries: 28

Rep: Reputation: 6166Reputation: 6166Reputation: 6166Reputation: 6166Reputation: 6166Reputation: 6166Reputation: 6166Reputation: 6166Reputation: 6166Reputation: 6166Reputation: 6166
I certainly hope not.
 
Old 07-28-2019, 10:01 PM   #3
schnappi
Member
 
Registered: Apr 2017
Posts: 52

Original Poster
Rep: Reputation: 3
Why?

Would rather use a single key and the password is only for use on devices that are not full disc encrypted.

Will just use multiple keys, so do not need a password for all keys.
 
Old 07-28-2019, 10:05 PM   #4
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,382
Blog Entries: 3

Rep: Reputation: 3773Reputation: 3773Reputation: 3773Reputation: 3773Reputation: 3773Reputation: 3773Reputation: 3773Reputation: 3773Reputation: 3773Reputation: 3773Reputation: 3773
Yes, there is a way to automatically load a pass phrase protected SSH key without you yourself running ssh-add, but it depends in part on which desktop environment you have. However, you'll still have to provide the pass phrase at the beginning in order to unlock it. Which desktop enviornment do you have and on which distro, including version?

Please say more about what you are trying to do. Someting is off and there is almost certainly a better work flow to try.
 
Old 07-29-2019, 12:26 AM   #5
schnappi
Member
 
Registered: Apr 2017
Posts: 52

Original Poster
Rep: Reputation: 3
Loading password protected SSH keys automatically on login, without having to type the password, in Xfce and Gnome.
 
Old 07-29-2019, 01:50 AM   #6
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,382
Blog Entries: 3

Rep: Reputation: 3773Reputation: 3773Reputation: 3773Reputation: 3773Reputation: 3773Reputation: 3773Reputation: 3773Reputation: 3773Reputation: 3773Reputation: 3773Reputation: 3773
Why? That's not how SSH keys with passphrases work.

Each key will need its passphrase stored in a key ring instead.

So look at gnome-keyring and seahorse. You will need a passphrase to unlock the key ring but then the keys within it will be unlocked by the key ring. They should be part of GNOME and easily added to XFCE4.
 
Old 07-29-2019, 08:40 AM   #7
schnappi
Member
 
Registered: Apr 2017
Posts: 52

Original Poster
Rep: Reputation: 3
Perfect. Hopefully the keyring password can be tied to login password.

Only purpose for SSH key passwords is when put keys on a machine not full disc encrypted. Prefer not to create multiple keys, some with passwords, some without.
 
  


Reply

Tags
ssh access using key



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
[SOLVED] Password protected key authorization with rsync AdultFoundry Linux - General 2 03-28-2016 08:53 AM
Samba shares with one non-password and 1 password protected dir garfy Linux - Newbie 5 02-13-2014 01:43 AM
How to automatically load password in bash script using ssh login process cwh Linux - Newbie 6 05-03-2013 03:35 PM
SSH skips public key authentication for a key, but works with another key simopal6 Linux - General 1 07-06-2011 08:33 AM
[SOLVED] Displaying the contents of buffers in a protected and non-protected critical section mashhype Programming 5 11-22-2010 09:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 01:49 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
Open Source Consulting | Domain Registration