Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Security and Privacy
FedoraForum Search

Forgot Password? Join Us!

Security and Privacy Sadly, malware, spyware, hackers and privacy threats abound in today's world. Let's be paranoid and secure our penguins, and slam the doors on privacy exploits.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 23rd December 2011, 03:31 AM
cdgary Offline
Registered User
 
Join Date: Dec 2011
Posts: 15
macossafari
Permanant Automatic ssh login without password

I'm ssh-ing between two machines and entering the passphrase key every time I need to connect to the other machine's ssh server. I added my key to the ssh-agent daemon using the below commands, which allowed me to use ssh one time without using the password, but when I returned back to the machine I originally ssh-ed from it prompted me for my passphrase key again when trying to ssh to the same machine, which totally defeats the point. How can I get the passphrase to hold permanently so I won't have these issues.

Code:
exec ssh-agent /bin/bash
ssh-add $HOME/.ssh/id_dsa
Enter passphrase for /home/user/.ssh/id_dsa:
Reply With Quote
  #2  
Old 23rd December 2011, 03:41 AM
TDAY Offline
Registered User
 
Join Date: Mar 2008
Posts: 41
linuxfirefox
Re: Permanant Automatic ssh login without password

I've always created an ssh key with ssh-keygen -t rsa which creates a file ~/.ssh/id_rsa.pub which I copy to the remote target in directory ~/.ssh/ via scp. Then you can cat the id_rsa.pub you copied into a file authorized_hosts. This should set up the "automatic" login process for you based on rsa keys.
Reply With Quote
  #3  
Old 23rd December 2011, 01:22 PM
cdgary Offline
Registered User
 
Join Date: Dec 2011
Posts: 15
windows_7ie
Re: Permanant Automatic ssh login without password

I'm aware of all of that. My post discusses issues I was having with a permanent automatic ssh login without using the passphrase key.
Reply With Quote
  #4  
Old 23rd December 2011, 02:09 PM
vallimar Offline
Registered User
 
Join Date: Jul 2008
Posts: 806
windows_xp_2003chrome
Re: Permanant Automatic ssh login without password

If you don't want to ever enter the passphrase, why not just create a new key without one?
Reply With Quote
  #5  
Old 23rd December 2011, 05:16 PM
AndrewSerk Offline
Registered User
 
Join Date: Oct 2010
Posts: 887
linuxfirefox
Re: Permanant Automatic ssh login without password

Hello,

To create the ssh key you should use dsa not rsa:
Code:
ssh-keygen -t dsa
To copy your key to a remote server you should use:
Code:
ssh-copy-id -i ~/.ssh/id_dsa.pub HOSTNAME_OR_IPADDRESS
Hope this helps,
Reply With Quote
  #6  
Old 23rd December 2011, 05:41 PM
jpollard Offline
Registered User
 
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,105
linuxfedorafirefox
Re: Permanant Automatic ssh login without password

As a reminder, this is no longer a secured login. IF your account is ever penetrated on any system, all your systems have also been penetrated.
Reply With Quote
  #7  
Old 23rd December 2011, 05:55 PM
AndrewSerk Offline
Registered User
 
Join Date: Oct 2010
Posts: 887
linuxfirefox
Re: Permanant Automatic ssh login without password

Quote:
Originally Posted by jpollard View Post
As a reminder, this is no longer a secured login. IF your account is ever penetrated on any system, all your systems have also been penetrated.
Thanks jpollard,
Old habits, Please disregard my above post.
Reply With Quote
  #8  
Old 23rd December 2011, 09:08 PM
aesir's Avatar
aesir Offline
Registered User
 
Join Date: Nov 2008
Location: ~
Age: 27
Posts: 175
linuxfirefox
Re: Permanant Automatic ssh login without password

I think pam_ssh is what you are looking for.
It's in the repos, "yum info pam_ssh".
Reply With Quote
  #9  
Old 24th December 2011, 09:23 AM
stevea's Avatar
stevea Online
Registered User
 
Join Date: Apr 2006
Location: Ohio, USA
Posts: 8,302
linuxfedorafirefox
Re: Permanant Automatic ssh login without password

Quote:
Originally Posted by AndrewSerk View Post
Thanks jpollard,
Old habits, Please disregard my above post.
There is no reason to disregard or retract it. It's merely a method that has an obvious security implication that JP' describes. That doesn't make it an unusable method.

Quote:
Originally Posted by cdgary View Post
I'm aware of all of that. My post discusses issues I was having with a permanent automatic ssh login without using the passphrase key.
You need to describe exactly what you mean - b/c you are making up terms.

'passphrase key' is meaningless. Keygen utility is used to create bother user and host keys. Your user account key can have a passphrase associated with it. In that case authentication requires two pieces of information - the other half-key and the passphrase.

If you create a key w/o a passphrase as AndrewSerk suggests then no passphrase - not even a null passphrase will be requested.

So you can do this ....

Quote:
[stevea@crucibulum Desktop]$ ssh hypoxylon
Last login: Fri Dec 23 04:08:41 2011 from crucibulum.localdomain
[stevea@hypoxylon ~]$ ssh lycoperdon
Last login: Wed Dec 21 09:49:59 2011
[stevea@lycoperdon ~]$
with no password or passphrase authentication.


Next - your meaning of "permanent automatic ssh login".

The putting the public half-key into ~/.ssh/authorized_hosts means the PubkeyAuthentication scheme can be use for authentication. That seems like 'permanent' to me.

There is no 'automatic' login per se. You either type "ssh me@somehost" or you can cause a window to appear that does this at login.
__________________
None are more hopelessly enslaved than those who falsely believe they are free.
Johann Wolfgang von Goethe
Reply With Quote
Reply

Tags
automatic, login, password, permanant, ssh

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Passing login password to script as part of login process - possible? hakonrk Security and Privacy 6 14th November 2011 04:34 PM
Automatic login without password prompt? mpledge52 Using Fedora 4 20th June 2010 05:33 PM
Fedora Core 10: Login Window to enable automatic login bghayad Using Fedora 1 8th June 2009 04:27 PM
Automatic password-protected locking in both X and VTs? joekrahn Security and Privacy 1 1st May 2008 02:08 AM


Current GMT-time: 06:26 (Thursday, 23-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat