SunQuest
           BSD Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsBSD Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old June 19th, 2005, 09:34 PM
n000b n000b is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Aug 2003
Location: Melbourne, Australia
Posts: 586 n000b User rank is Corporal (100 - 500 Reputation Level)n000b User rank is Corporal (100 - 500 Reputation Level)n000b User rank is Corporal (100 - 500 Reputation Level)n000b User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 2 Days 11 h 38 m 40 sec
Reputation Power: 7
Send a message via ICQ to n000b
SSH Security

Hey guys,

I've got a webhosting box, and some of my clients want SSH access. Are there any security holes/precautions that I should be aware of? Is it possible for a user to access anything outside of their account? etc.

Reply With Quote
  #2  
Old June 19th, 2005, 10:30 PM
CyBerHigh CyBerHigh is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 430 CyBerHigh User rank is Sergeant (500 - 2000 Reputation Level)CyBerHigh User rank is Sergeant (500 - 2000 Reputation Level)CyBerHigh User rank is Sergeant (500 - 2000 Reputation Level)CyBerHigh User rank is Sergeant (500 - 2000 Reputation Level)CyBerHigh User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 4 Days 6 h 46 m 57 sec
Reputation Power: 20
Send a message via AIM to CyBerHigh
well ssh is actually giving them all there rights as a user on that computer. So it is like the user is infront of the computer loged in. Everything there is what they can do through ssh.

Now you should be very causes with file rights, make sure that there are no passwords in files read/writible by the users. Make sure they can't execute anything that they do not need to execute. Make all other users files unreadible. Things of that sort. Keep your box up to date so you do not have to worrie about security ishues. Also disable root login though ssh.
__________________
My Site:
http://www.coryhardman.com

Reply With Quote
  #3  
Old June 20th, 2005, 11:21 AM
LinuxPenguin's Avatar
LinuxPenguin LinuxPenguin is offline
fork while true;
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: May 2005
Location: England, UK
Posts: 5,535 LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)  Folding Points: 11590 Folding Title: Novice Folder
Time spent in forums: 1 Month 3 Weeks 1 Day 19 h 23 m 58 sec
Reputation Power: 1008
*sigh*

OK heres the deal. Yes, you give them access to your box, no it isnt giving them root.

Set restrictions carefully for them.

Also to repeat some of the above post, make sure you chown/chmod files properly first, dont want anyone deleting important files...

to give shell access

usermod username +s

use --help on that to get a full listing.

Remember, its worth taking time to ensure your system files are protected

chown -R root:root /root /etc /usr

and

chmod -R 755 /root /etc /usr etc....

enjoy

Reply With Quote
  #4  
Old June 21st, 2005, 02:02 AM
M.Hirsch M.Hirsch is offline
Contributing User
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: Oct 2000
Location: Back in the real world.
Posts: 5,969 M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Month 1 Day 22 h 39 m 55 sec
Reputation Power: 184
Quote:
Originally Posted by LinuxPenguin
Remember, its worth taking time to ensure your system files are protected

chown -R root:root /root /etc /usr

and

chmod -R 755 /root /etc /usr etc....

enjoy

Sorry, but that's rather bad advice.
Among many other problems your suggestion would cause, you'd set the shadow password file world readable? WHY?

M.
__________________
--
Manuel Hirsch - Linux, FreeBSD, programming, administration articles, tutorials and more.

Reply With Quote
  #5  
Old June 21st, 2005, 03:45 PM
LinuxPenguin's Avatar
LinuxPenguin LinuxPenguin is offline
fork while true;
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: May 2005
Location: England, UK
Posts: 5,535 LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)  Folding Points: 11590 Folding Title: Novice Folder
Time spent in forums: 1 Month 3 Weeks 1 Day 19 h 23 m 58 sec
Reputation Power: 1008
Quote:
Originally Posted by M.Hirsch
Sorry, but that's rather bad advice.
Among many other problems your suggestion would cause, you'd set the shadow password file world readable? WHY?

M.

umm you have a fair point. make that 700

Reply With Quote
  #6  
Old June 21st, 2005, 11:41 PM
M.Hirsch M.Hirsch is offline
Contributing User
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: Oct 2000
Location: Back in the real world.
Posts: 5,969 M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Month 1 Day 22 h 39 m 55 sec
Reputation Power: 184
Quote:
Originally Posted by LinuxPenguin
umm you have a fair point. make that 700

No, forget about this completely.
You'll fsck the filesystem permissions. Not everything in /etc must be owned by root. Same for /usr. 0700 will kill many programs

If you want to know more about the default permissions, check out "mtree". /etc/mtree/ contains files describing the _correct_ permissions for each file.

Leave it as is, FreeBSD local security is mostly OK by default.
But check everything in /usr/local.

M.

Reply With Quote
  #7  
Old June 22nd, 2005, 01:40 AM
n000b n000b is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Aug 2003
Location: Melbourne, Australia
Posts: 586 n000b User rank is Corporal (100 - 500 Reputation Level)n000b User rank is Corporal (100 - 500 Reputation Level)n000b User rank is Corporal (100 - 500 Reputation Level)n000b User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 2 Days 11 h 38 m 40 sec
Reputation Power: 7
Send a message via ICQ to n000b
So should I be chown'ing any files?

Reply With Quote
  #8  
Old June 22nd, 2005, 05:02 AM
M.Hirsch M.Hirsch is offline
Contributing User
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: Oct 2000
Location: Back in the real world.
Posts: 5,969 M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Month 1 Day 22 h 39 m 55 sec
Reputation Power: 184
Quote:
Originally Posted by n000b
So should I be chown'ing any files?

No, unless you created them.

You can "chmod -s" to remove SUID binaries, but don't change anything else without knowing _exactly_ what you're doing and why.

M.

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsBSD Help > SSH Security


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate 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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway