net-ssh / net-sftp

Pure Ruby implementation of an SFTP (protocols 1-6) client.
http://net-ssh.github.io/
MIT License
286 stars 130 forks source link

please support protocol version 3 ("posix-rename@openssh.com") #31

Open martin21 opened 11 years ago

martin21 commented 11 years ago

While trying to make distkeys work with Ruby 1.9 in order to get it included in Debian, I tried to work around bug

ruby-net-ssh: can't add a new key into hash during iteration during ssh.exec https://github.com/net-ssh/net-ssh/issues/110

by using sftp.rename!, however openssh 6.2p1 does not yet support sftp protocol version 5 for flags 0x0001 for overwrite and 0x0002 for atomic rewrite yet:

Bug 2123 - does not seem to support sftp protocol version 5 rename flag for overwriting files https://bugzilla.mindrot.org/show_bug.cgi?id=2123

According to Darren it does however support a vendor extension to protocol version 3 ("posix-rename@openssh.com")¹. Please support this especially as he says its unlikely that OpenSSH will support SFTP protocol 5 soon.

Git repo for distkeys is

git://oss.teamix.org/distkeys.git

reproducer tag is openssh-bug-2123.

[1] https://bugzilla.mindrot.org/show_bug.cgi?id=2123#c2

Thanks, Martin

delano commented 11 years ago

This is a good idea. The project is in maintenance mode at the moment (actually I should update the readme to reflect that) but I'm happy to bring in pull requests if you or someone else can make the change.