Open alfredodeza opened 11 years ago
I don't mind adding extra_args
, but I think there should be an option specifically for allocating a pseudo-TTY. As well as OpenSSH, there's also PuTTY/plink (in this case it has the same format) and paramiko clients to consider.
If I know that I am using native (as opposed to PuTTY) then the only thing I need is to be able to pass in extra flags to extend the arguments for SSH. If the native SSH client is the only one supporting it I don't see why it would be a problem.
That transport is almost there, extending the arguments with some flags, I am only asking to go one step further and allow honoring extra flags.
@alfredodeza I don't have a problem with having extra_args
(I will do this), I'm just saying that in this case I'll probably add another option that the other two transports will accept too. I'm away for work at the moment, but I should have this change in in a few days.
I started having a look at this this evening. It's not as trivial as adding extra_args
. Since the spawned ssh process is not connected to a terminal, ssh ignores "-t". It would need a pty itself.
I'm seeing some issues with newer SSH clients where the configuration is set to disallow
sudo
in non-tty environments, and given the fact that our tool requiressudo
for pretty much all of the remote commands we get a problem where users simply cannot use our tool unless they change their SSH configurations.ssh
allows the usage of-t
as a flag to override this, but we are not able to pass that flag to the NativeSSHClient because the**kwargs
in the client ignore them.Something like an
extra_args
keyword argument that accepts a list so we can expand the flags to SSH would be ideal.ceph-deploy issue opened to track this: http://tracker.ceph.com/issues/6104