[Libvir] [PATCH] add no_tty flag for ssh

Richard W.M. Jones rjones at redhat.com
Wed Sep 12 10:21:29 UTC 2007


This patch adds an extra no_tty=1 flag to the connection URI.  This 
stops ssh from asking for a password if it can't log in automatically. 
Typical use-case for this is in graphical programs where if ssh asks for 
a password it would cause the GUI program to hang.

Example:

$ virsh -c xen+ssh://xxx/ list
rjones at xxx's password:
Permission denied, please try again.
rjones at xxx's password:
Permission denied, please try again.
rjones at xxx's password:
Permission denied (publickey,gssapi-with-mic,password).
libvir: Remote error : Connection reset by peer
error: failed to connect to the hypervisor
error: no valid connection

$ virsh -c xen+ssh://xxx/?no_tty=1 list
Permission denied (publickey,gssapi-with-mic,password).
libvir: Remote error : Connection reset by peer
error: failed to connect to the hypervisor
error: no valid connection


Rich.

-- 
Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod
Street, Windsor, Berkshire, SL4 1TE, United Kingdom.  Registered in
England and Wales under Company Registration No. 03798903
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libvirt-notty.patch
Type: text/x-patch
Size: 2747 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20070912/16dc7a4c/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3237 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20070912/16dc7a4c/attachment-0003.bin>


More information about the libvir-list mailing list