##// END OF EJS Templates
Use cast_bytes_py2 for getpass() prompt
Thomas Kluyver -
Show More
@@ -38,7 +38,7 b' from IPython.config import Configurable'
38 from IPython.core.profiledir import ProfileDir
38 from IPython.core.profiledir import ProfileDir
39 from IPython.utils.localinterfaces import LOCALHOST
39 from IPython.utils.localinterfaces import LOCALHOST
40 from IPython.utils.path import filefind, get_ipython_dir
40 from IPython.utils.path import filefind, get_ipython_dir
41 from IPython.utils.py3compat import str_to_bytes, bytes_to_str
41 from IPython.utils.py3compat import str_to_bytes, bytes_to_str, cast_bytes_py2
42 from IPython.utils.traitlets import (
42 from IPython.utils.traitlets import (
43 Bool, Integer, Unicode, CaselessStrEnum,
43 Bool, Integer, Unicode, CaselessStrEnum,
44 )
44 )
@@ -360,7 +360,7 b' def tunnel_to_kernel(connection_info, sshserver, sshkey=None):'
360 if tunnel.try_passwordless_ssh(sshserver, sshkey):
360 if tunnel.try_passwordless_ssh(sshserver, sshkey):
361 password=False
361 password=False
362 else:
362 else:
363 password = getpass("SSH Password for %s: "%str(sshserver))
363 password = getpass("SSH Password for %s: " % cast_bytes_py2(sshserver))
364
364
365 for lp,rp in zip(lports, rports):
365 for lp,rp in zip(lports, rports):
366 tunnel.ssh_tunnel(lp, rp, sshserver, remote_ip, sshkey, password)
366 tunnel.ssh_tunnel(lp, rp, sshserver, remote_ip, sshkey, password)
General Comments 0
You need to be logged in to leave comments. Login now