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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
08-21-2007, 03:08 PM
|
#1
|
LQ Newbie
Registered: Aug 2005
Posts: 23
Rep:
|
Advice needed: Need to set up SCP for remote users
I generally use hosts.allow to lock-down services and IPs that can access my machines, all of which sit inside of a firewall and can only be accessed via LAN, WAN, or VPN. That said, I have to set up a machine which will be exposed to the outside which will allow a Windows application to drop a datafile off.
My plan is to set a rule on the firewall to only allow SSH traffic to this machine. The app will have a username/password that it passes and all the files will be dropped off, via SCP, in one /home directory. This still leaves me open to brute force attacks etc. I will not know the IPs of valid users, they will be connecting through their ISPs.
I could use some ideas on hardening this approach. Thanks.
|
|
|
08-21-2007, 03:19 PM
|
#2
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
1) use ssh preshared keys and disbled text passwords so brute force attacks are irrelevant
2) use fail2ban to analyze connection logs and ban IP's apparently trying to brute force in the first place.
|
|
|
08-21-2007, 03:24 PM
|
#3
|
Senior Member
Registered: Mar 2006
Posts: 1,896
Rep:
|
If possible, only authenticate via public key encryption. I.e. don't allow passwords. The downside of that is if your users get careless with their private keys, anybody with possessing that key can log in. You might be able to tighten that down by only allowing logins via these keys to execute a particular command (a feature available with public key logins). If your remote user will be executing an scp command, I believe the local command is also scp, possibly with parameters. I am not sure of details, but I think it can be done. And, of course, you want the account they are logging into to have no more access than necessary.
|
|
|
08-23-2007, 01:46 PM
|
#4
|
LQ Newbie
Registered: Aug 2005
Posts: 23
Original Poster
Rep:
|
Thanks for the input; a few questions:
1. Is it possible to have Public key authentication for a single user, rather than the whole server.
2. What is a good strategy for locking down a user to write only to a single directory?
Thanks, this has been very instructive.
|
|
|
08-23-2007, 02:52 PM
|
#5
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
1. yes absolutely. both server wide and user specific keys of the account being logged into are checked as standard so if a known user has their matching key in /home/userA/.ssh/authorized_keys then that account only will permit access.
2. well a normal user account in a proper system will largely be in that state by default, except for /tmp. you could always place them in a chroot jail so the rest of the file system is inaccessible...
|
|
|
All times are GMT -5. The time now is 01:04 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
|
|