Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: OpenSSH: Dev

[no subject]

 

 

OpenSSH dev RSS feed   Index | Next | Previous | View Threaded


guyverdh at hotmail

Oct 9, 2007, 12:29 PM

Post #1 of 4 (994 views)
Permalink
[no subject]

I understand that that is not how scp works today.
I'm suggesting that we make a minor change to how it works.
Here's the underlying reason why I think this is a good idea. The efforts required to lock down todays systems with their myriad of access features is not a trivial task. I'm not suggesting this will make it trivial to completely secure a system. I am suggesting this will make it trivial to secure one subset of the system. That subset being scp.
Using chroot'd environments doesn't really work (or at least they were never intended to be used as a security tool) without tons of effort, and even then, they tend to break rapidly with simple system/software updates. sftp at the present time, gives access to too many additional commands / features that are unnecessary for a simple file transfer. scp would fit the bill nicely, with one minor change. Let's forget about translating ../ to something else.

Given the "-T" instead of "-t" startup parameter, a simple walk through the parameters passed by the scp client spawning the scp server should do the following:
Prefix the remote path with "./", so that remhost:/path/to/file becomes remhost:.//path/to/file.
If the remote path contains "../" anywhere, error out.

With this change, we can forget about scp-only or chroot'd environments and all the convoluted mess required to make that work.

Either spawn scp with the "-T" via a public key authentication command entry, or the sshd_config file "UseSCPPathLock=Yes".
Through this option, we get a secure method of transfering files without much effort. Combine this with pub-key authentication, and command= parameters, you can control where any user places their files if outside of their home directories. Simple user permissions on the remote server control whether or not writes are allowed, or just reads. A very simple change could open a whole lot of opportunity for usage expansion. If sftp-server had this same option, then that might work, however, I haven't seen that it does - yet there would seem to me to be a lot more changes required to implement the same idea within sftp-server as it would within scp.
_________________________________________________________________
Windows Live Hotmail and Microsoft Office Outlook – together at last.  Get it now.
http://office.microsoft.com/en-us/outlook/HA102225181033.aspx?pid=CL100626971033
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev [at] mindrot
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev


stuge-openssh-unix-dev at cdy

Oct 9, 2007, 9:12 PM

Post #2 of 4 (899 views)
Permalink
Re: your mail [In reply to]

On Tue, Oct 09, 2007 at 02:29:37PM -0500, Larry Becke wrote:
> I understand that that is not how scp works today.

And it will likely never change.


> I'm suggesting that we make a minor change to how it works.

scp is maintained for compatibility reasons only, as I've understood
things.


> I am suggesting this will make it trivial to secure one subset of
> the system. That subset being scp.

Moot point unless scp is the only way users can use the system, which
I don't think is the case all too often.

Either you're prepared to make an effort in order to make the system
secure, or it doesn't matter. Hacking up scp is good for neither. :\


//Peter
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev [at] mindrot
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev


rapier at psc

Oct 10, 2007, 8:15 AM

Post #3 of 4 (885 views)
Permalink
Re: your mail [In reply to]

Peter Stuge wrote:
> On Tue, Oct 09, 2007 at 02:29:37PM -0500, Larry Becke wrote:
>> I understand that that is not how scp works today.
>
> And it will likely never change.

Which is unfortunate because scp is, based on the logs I have access to,
what most users are using to transfer files. As much as it might be
nice if they moved to sftp I don't see it happening with any real
rapidity. We can argue all we like that sftp is better or rsync is
superior but unless the users agree it doesn't matter what we might
happen to think. I'm not saying that to be snotty or confrontational -
only as an observation of what I see around me.

>> I am suggesting this will make it trivial to secure one subset of
>> the system. That subset being scp.
>
> Moot point unless scp is the only way users can use the system, which
> I don't think is the case all too often.

No but unless you remove scp entirely many users, if not most, will keep
using it. Now, its possible that through user education you may be able
to tip the scales and get more of them to use sftp or some other method.
Of course, if user education really worked well half of us would
probably be out of work.

> Either you're prepared to make an effort in order to make the system
> secure, or it doesn't matter. Hacking up scp is good for neither. :\

Why not? I mean, we always hear people saying that scp is only in there
for compatibility reasons but what, precisely, is wrong with scp? If
there is something wrong with it then doesn't it makes sense to simply
stop distributing it? If there is nothing wrong with it then doesn't it
make sense to actually improve it to bring added functionality to users?

Chris
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev [at] mindrot
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev


peter at stuge

Sep 10, 2009, 1:55 PM

Post #4 of 4 (645 views)
Permalink
Re: your mail [In reply to]

Chris Rapier wrote:
> >> I understand that that is not how scp works today.
> >
> > And it will likely never change.
>
> Which is unfortunate because scp is, based on the logs I have
> access to, what most users are using to transfer files. As much as
> it might be nice if they moved to sftp I don't see it happening
> with any real rapidity. We can argue all we like that sftp is
> better or rsync is superior but unless the users agree it doesn't
> matter what we might happen to think.

I agree. We need scp to use sftp. On that note - I'm excited about
the outcome of the Google Summer of Code project! How did it go? :)


//Peter
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev [at] mindrot
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev

OpenSSH dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.