IETF-SSH archive

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

Re: SCP under SSH2



Thanks a lot for all the answers, specially Sara.

I do see that SCP could be used and take part of the market, since SFTP is a little big and continue growing. Anybody knows of SFTP implementation (client or server) newer than version 4?

I will take a look at OpenSSH to understand the details, in particular the time (second from when), modes(octal), and basename.

Thanks again.

Claudio Robles

----- Original Message ----- From: "Sara Golemon" <ietf-secsh%libssh2.org@localhost>
To: "Claudio Robles" <crobles7%comcast.net@localhost>
Sent: Monday, September 12, 2005 12:24 AM
Subject: Re: SCP under SSH2


It is possible to use SCP under SSH2? and if this is the case, where can I
find the SCP protocol?  I understand that the protocol is in fact, RCP
protocol, but also I have not being able to find it....

SCP is done over a "session"/"exec" channel (with the assumption that
the "scp" command will be in the remote path.  Check OpenSSH's source
for the specific conversation language.

Generally for receiving files it's:
exec: "scp -pf /path/to/file"
C: \0    (Literally, send a null byte)
S: T 99999 99999 99999 999999 (mtime.sec mtime.usec atime.sec atime.usec)
C: \0
S: C 0999 99999999 SSSSS  (mode[octal] filelen basename)
C: \0
S: XXXXXXXXXXXXXXX   (File Data, <filelen> bytes)

Sending is the same conversation with roles reversed
exec: "scp -pt /path/to/file"
S: \0    (Literally, send a null byte)
C: T 99999 99999 99999 999999 (mtime.sec mtime.usec atime.sec atime.usec)
S: \0
C: C 0999 99999999 SSSSSS  (mode[octal] filelen basename)
S: \0
C: XXXXXXXXXXXXXXX   (File Data, <filelen> bytes)

In both cases, if the 'p' is ommitted from the options then
mtime/atime is not sent.





Home | Main Index | Thread Index | Old Index