Transferring file to local machine when SSHing into a foreign box
Steffen Daode Nurpmeso
sdaoden at googlemail.com
Mon May 14 20:23:30 EST 2012
John Olsson M <john.m.olsson at ericsson.com> wrote:
| > I imagine something like this:
| > The user would run a command such as the following:
| > remoteServer$ cp2local someFile.c
| > The SSH server on the remote host would then push the file to the
| > SSH client running locally just as if scp had been used, but it
| > would reuse the existing connection. The local SSH client would
| > then write the file just as it would have had scp been used.
|
| You also need to consider the case where the user is *not* running a normal (like TCSH, Bash, ZSH, ...) shell on the server and where the file system is exposed as a virtual filesystem via SFTP (which might run in another chrooted directory than the SSH subsystem).
|
| What would a path to a local file look like in this context?
|
| I see this as a security hole since you suddenly get acess to files via SSH which you do not get access to via SFTP (since it is chrooted)...
As i understood him (unfortunately i've dropped the mail after
i've got the impression this will not make it anyway, sorry!) he
thought about something like
myself at local-host$ ssh myself at host-over-ssh
myself at host-over-ssh$ ~Copy_file path_on_local-host path(_on_host-over-ssh)
Why should this open a security hole, given that
myself at host-over-ssh has proper permissions for
path_on_host-over-ssh? E.g., the session can do
myself at host-over-ssh$ echo $(date) > path(_on_host-over-ssh)
The problem i see however is that there will be no filename
completion for at least path_on_local-host.
| /John
--steffen
Forza Figa!
More information about the openssh-unix-dev
mailing list