[scponly] scponly, scp, and directories with spaces in their names

Jeremiah D. Weiner jdw2004 at med.cornell.edu
Mon Apr 9 17:09:19 EDT 2007


	I've been banging my head against a problem that seems to stem from  
scponly.  Here's the situation: I need to transfer some files to a  
remote server run by a different group.  I have scponly as my shell  
there, so I can use scp or sftp.  The problem is that there's a  
directory with a space in it's name on the remote server.  (Don't  
ask, I didn't make it.)  This is not a problem for sftp, but it seems  
to break scp _under scponly_.  Ordinarily, directories with spaces  
are not a problem for scp as long as you take care to protect it from  
the shell.

Here's a demonstration of the problem on a demo system.  Firstly,  
with my personal account:

oacconf:~/Personal$ scp Command_Line.pdf "jdw2004 at jove:/tmp/Dances\  
With\ Spaces/"
Command_Line.pdf

	Ta-da, works fine.  Now let's try it with the scpdemo account which  
has scponly as its shell...

oacconf:~/Personal$ scp Command_Line.pdf "scpdemo at jove:/tmp/Dances\  
With\ Spaces/"
scpdemo at jove's password:
scp: ambiguous target

Same systems, same syntax.  The only difference is that scpdemo has  
the scponly shell.  Is there a way to work around this on the client  
side?  No combination of quoting and escaping has helped.

	And yeah, the easier answers might be "Don't use spaces in directory  
names, then", or "Get them to open up regular access"...but I'm  
curious to know if there's a way around this.


-- 
JD Weiner, senior e-learning server administrator
Cornell Weill Medical College



More information about the scponly mailing list