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

Re: RFS: distkeys/1.0 -- distribute SSH keys



Re,

(feel free to omit RFS bug CC again, just wanted to provide an update for 
BTS.)

Am Montag, 24. Juni 2013 schrieb Martin Steigerwald:
> Hi Antonio,
> 
> ----- Ursprüngliche Mail -----
> 
> > On Wed, Jun 19, 2013 at 03:59:53PM +0200, Martin Steigerwald wrote:
> > > Currently it only works with Ruby 1.8 (which is mentioned in
> > > README).
> > 
> > I intend to EOL Ruby 1.8 in Debian pretty soon ... it's not a good
> > idea to upload 1.8-only software at this point.
> > 
> > (haven't checked the package though)
> 
> Distkeys itself is not ruby 1.8 specific. But with ruby 1.9 a call to
> sftp.lstat bails out with error message:
> 
> /usr/lib/ruby/vendor_ruby/net/ssh/connection/session.rb:296:in `[]=':
> can't add a new key into hash during iteration (RuntimeError) from
> /usr/lib/ruby/vendor_ruby/net/ssh/connection/session.rb:296:in
> `open_channel' from

I had a look at the code in session.rb but I did not understand on why it 
fails with that error message. Thus I reported:

ruby-net-ssh: can't add a new key into hash during iteration during 
ssh.exec
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=714606

https://github.com/net-ssh/net-ssh/issues/110


Then I tried to work-around with using ruby-net-sftp rename! function and 
ran into:

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

please support protocol version 3 ("posix-rename@openssh.com")
https://github.com/net-ssh/net-sftp/issues/31

ruby-net-scp does not seem to support renames.


Now it does work with Ruby 1.9 by using SFTP work-around of first deleting 
the old authorized_keys file and renaming authorized_keys.new afterwards. I 
do not like this work-around, cause in a (I think unlikely) race it could 
result in no authorized_keys file on server, but for now I do not have any 
other idea.


I documented the work-around in the changelog and like to fix it once 
another way of doing it becomes applicable.


Please review.

Thanks,
-- 
Martin Steigerwald - teamix GmbH - http://www.teamix.de
gpg: 19E3 8D42 896F D004 08AC A0CA 1E10 C593 0399 AE90


Reply to: