[project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-99]
use getpass convert raw_input to getpass as suggested many weeks ago.
This commit is contained in:
parent
6eb59a2b53
commit
1d1a60047c
|
@ -176,7 +176,7 @@ if options.use_key:
|
||||||
if not READPASS:
|
if not READPASS:
|
||||||
print '*** Password needed for keyfile (use -P): %s' % options.keyfile
|
print '*** Password needed for keyfile (use -P): %s' % options.keyfile
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
key_password = raw_input()
|
key_password = getpass.getpass('Enter password for key: ')
|
||||||
try:
|
try:
|
||||||
key = paramiko.RSAKey.from_private_key_file(options.keyfile, key_password)
|
key = paramiko.RSAKey.from_private_key_file(options.keyfile, key_password)
|
||||||
except:
|
except:
|
||||||
|
@ -190,7 +190,7 @@ if key is None:
|
||||||
if not READPASS:
|
if not READPASS:
|
||||||
print '*** Either a valid private key or password is required (use -K or -P).'
|
print '*** Either a valid private key or password is required (use -K or -P).'
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
password = raw_input()
|
password = getpass.getpass('Enter password: ')
|
||||||
|
|
||||||
verbose('Connecting to ssh host %s:%d ...' % (options.ssh_host, options.ssh_port))
|
verbose('Connecting to ssh host %s:%d ...' % (options.ssh_host, options.ssh_port))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue