[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [suse-security] chroot: ssh works, scp doesn't (more info)



/ 2004-01-23 16:21:58 -0000
\ Tom Knight:
> 
> > > So it looks like scp doesn't like the login shell being 
> > /bin/compart.jail
> > > 
> > > There must be a way.....
> > 
> > blindly guessing:
> > echo "/bin/compart.jail" >> /etc/shells
> 
> Worth a try I guess, even though ssh works fine.
> 
> Just tried it, and no joy :-(

what I found by means of google:

| I suspect this won't work.  Scp is nothing but a hardcoded command running 
| over an ssh channel.  When you scp a file to a remote host, your local 
| host makes an ssh connection to the remote system and then runs a specific 
| command on that remote system -- which means that you have to have a 
| shell that, minimally, accept the '-c <command>' command line option.
| 
| For example, the following command:
| 
|   scp file remotehost:
| 
| Is largely equivilent to:
| 
|   ssh remotehost <shell> -c "scp -t ."

so please try again with

/bin/compart.jail:
#!/bin/bash
/bin/bash "$@"
 
if that works, all you have to do is go back to your first try,
but don't forget to pass the command line arguments

   ;)

	Lars Ellenberg

-- 
Check the headers for your unsubscription address
For additional commands, e-mail: suse-security-help@xxxxxxxx
Security-related bug reports go to security@xxxxxxx, not here