LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 09-26-2004, 01:03 AM   #1
Obie
Member
 
Registered: Apr 2004
Distribution: Red Hat
Posts: 290

Rep: Reputation: 30
Exclamation Ssh


Do I need to install a SSH server on my Linux box if I wish to SSH into it? Also what do I need to perform to lockdown SSH?
 
Old 09-26-2004, 02:50 AM   #2
d0odman
Member
 
Registered: Sep 2004
Location: CA, USA
Distribution: Slackware 10.2
Posts: 132

Rep: Reputation: 15
yes

You sure do need an ssh server if you want to ssh in to your box. There's a bunch of documentation on the server if you unpackage the source, providing you compile it from source. Even if you don't, there should be a bunch of documentation in the distribution you use.

For the most part, pretty much all the major distributions have as a default ssh server install. There's a system wide configuration file called ssh_config that you can look at that's pretty well commented. Then there's user ssh configuration files.

Just look through your tree for stuff related to ssh, 'locate ssh' more stuff than you can shake a stick at should show up.
 
Old 09-27-2004, 03:37 AM   #3
Cerbere
Member
 
Registered: Dec 2002
Location: California
Distribution: Slackware & LFS
Posts: 799

Rep: Reputation: 33
Just want to clarify one point: The relevant file is sshd_config. The ssh_config file is the ssh client configuration. Whereas the sshd_config file is the server (or ssh daemon) configuration file.

And, on the subject of 'locking down' your ssh server, two things to implement are:
a) Change the line which reads 'Protocol 1,2' in sshd_config to 'Protocol 2'.
b) Change the line which reads 'PermitRootLogin yes' to 'PermitRootLogin no'. It is more secure to log in as a regular user, then su to root if necessary.

Enjoy!
--- Cerbere
 
Old 09-28-2004, 03:17 AM   #4
Obie
Member
 
Registered: Apr 2004
Distribution: Red Hat
Posts: 290

Original Poster
Rep: Reputation: 30
Cerbere,

Thanks for your advice. I just wish to clarify what happens when I "Change the line which reads 'Protocol 1,2' in sshd_config to 'Protocol 2'."
 
Old 09-28-2004, 04:25 AM   #5
Cerbere
Member
 
Registered: Dec 2002
Location: California
Distribution: Slackware & LFS
Posts: 799

Rep: Reputation: 33
Making that change will instruct sshd to not accept connections using protocol 1, which has been superseded by protocol 2. The following is an excerpt from a nessus scan run on a server which allows both:
Quote:
Warning found on port ssh (22/tcp)

The remote SSH daemon supports connections made
using the version 1.33 and/or 1.5 of the SSH protocol.

These protocols are not completely cryptographically
safe so they should not be used.

Solution :
If you use OpenSSH, set the option 'Protocol' to '2'
If you use SSH.com's set the option 'Ssh1Compatibility' to 'no'

Risk factor : Low
Notice the risk from this is considered low. However, IMHO it's a simple fix, so why leave even a remote vulnerability. Give it a try, then if your ssh client can't connect, you can either get a newer client, or change the config back to allow protocol 1.

You can find more info about 'problems' with ssh here: http://www.sans.org/top20/#u8

Enjoy!
--- Cerbere
 
Old 09-28-2004, 02:38 PM   #6
Obie
Member
 
Registered: Apr 2004
Distribution: Red Hat
Posts: 290

Original Poster
Rep: Reputation: 30
Cerbere,

Thank you for your advice and detailed illustration.
 
  


Reply



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
ssh-agent, ssh-add and ssh-keygen AND CVS raylpc Linux - General 2 11-19-2008 02:50 AM
[SSH] Issue logging in [SSH & Permissions] MD3 Linux - Networking 11 12-10-2006 09:25 AM
Mac OS X ssh client / linux sshd : ssh hangs/disconnects Apollo77 Linux - Networking 1 05-24-2006 11:53 AM
I turned off SSH, but I cant get it back! How do you start SSH on boot? nmoog Slackware 2 02-08-2004 05:18 PM
ssh issue: /usr/bin/ssh -x -oFallBackToRsh no -l WeNdeL Linux - Software 1 03-04-2003 07:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 06:56 AM.

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