Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
06-08-2010, 04:17 PM
|
#1
|
|
LQ Veteran
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,089
|
ssh-keygen -t rsa -b 2048 without a passphrase
I was wondering whether increasing the strength of a key by increasing the number of bits in the key to 2048 makes any sense if I want to leave the passphrase blank anyway?
I'm setting up passwordless ssh logins on my LAN as I'm a bit tired of constantly being asked for a password.
Thank you
|
|
|
|
06-08-2010, 05:12 PM
|
#2
|
|
Senior Member
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Debian, FreeBSD, Ubuntu (desktop)
Posts: 3,859
Rep: 
|
Check the ssh-keygen(1) manpages for your OS; -b 2048 should already be the default for most modern-ish implementations.
---
edit: Eh, I'm not sure if it makes sense. I am not crystal clear on whether your private key is derived from the passphrase.
Last edited by anomie; 06-08-2010 at 05:15 PM.
|
|
|
|
06-08-2010, 05:28 PM
|
#3
|
|
LQ Veteran
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,089
Original Poster
|
Thanks. You might be right. I'm not sure if I get it right but according to the man page, the -b flag has nothing to with the private key which is encrypted using 128-bit AES.
When it comes to default value of -b, you're right, it is 2048.
|
|
|
|
06-09-2010, 01:54 PM
|
#4
|
|
Member
Registered: May 2005
Location: Northern VA
Distribution: Slackware, FreeBSD, OpenBSD, Mac OS X , Backtrack, Ubuntu on a Dell Mini 9
Posts: 780
Rep: 
|
If you're tired of constantly being asked for your password, maybe you should just utilize ssh-agent.
If you create a passphrase-less key, what prevents someone from stealing and using that key? After all, it isn't locked down with a passphrase, right?
AFAIK, the private key isn't derived from the passphrase.
You can create a passphrase-less key, but it isn't a best practice.
|
|
|
|
06-09-2010, 10:58 PM
|
#5
|
|
Guru
Registered: Aug 2004
Location: Brisbane
Distribution: Centos 6.4, Centos 5.9
Posts: 14,973
|
The key-length protects data 'in-flight'. The longer the key, the harder to break.
The passphrase is a separate issue. If the system is secure enough, not having a passphrase maybe ok.
If you need to automate processes, then either
1. no passphrase
2. use ssh-agent as described, but you need to call the program from within that session. This is not practical for cron jobs.
|
|
|
|
06-10-2010, 04:06 PM
|
#6
|
|
LQ Veteran
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,089
Original Poster
|
Quote:
Originally Posted by unixfool
If you're tired of constantly being asked for your password, maybe you should just utilize ssh-agent.
If you create a passphrase-less key, what prevents someone from stealing and using that key? After all, it isn't locked down with a passphrase, right?
You can create a passphrase-less key, but it isn't a best practice.
|
Thank you all for your answers.
I know that in terms of security having a passwordless anything is not best practice, but as I said it's just for the purpose of my private LAN.
Let me get this straight, if someone steals that key they could ssh into my computer from any other box (assuming I allow ssh from outside of my LAN, which I don't) without any password. Is that right?
I'm missing something here. I thought the introduction of keys was to get rid of passphrases in the first place. Yes....., I'm definitely missing something here 
|
|
|
|
06-10-2010, 04:31 PM
|
#7
|
|
Senior Member
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Debian, FreeBSD, Ubuntu (desktop)
Posts: 3,859
Rep: 
|
Quote:
|
Originally Posted by sycamorex
Let me get this straight, if someone steals that key they could ssh into my computer from any other box (assuming I allow ssh from outside of my LAN, which I don't) without any password. Is that right?
|
Yes, that's right.
But: you should take a look at the ssh-keygen(1) manpages, -O (constraint) option. You can restrict access by source address. (I'm not sure which version of openssh this first appeared in.)
|
|
|
|
06-10-2010, 04:42 PM
|
#8
|
|
LQ Veteran
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,089
Original Poster
|
Nice one, further IP restrictions (among others). Thanks
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 12:25 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|