Show More
@@ -81,7 +81,12 b' def _try_passwordless_openssh(server, keyfile):' | |||||
81 | def _try_passwordless_paramiko(server, keyfile): |
|
81 | def _try_passwordless_paramiko(server, keyfile): | |
82 | """Try passwordless login with paramiko.""" |
|
82 | """Try passwordless login with paramiko.""" | |
83 | if paramiko is None: |
|
83 | if paramiko is None: | |
84 |
|
|
84 | msg = "Paramiko unavaliable, " | |
|
85 | if sys.platform == 'win32': | |||
|
86 | msg += "Paramiko is required for ssh tunneled connections on Windows." | |||
|
87 | else: | |||
|
88 | msg += "use OpenSSH." | |||
|
89 | raise ImportError(msg) | |||
85 | username, server, port = _split_server(server) |
|
90 | username, server, port = _split_server(server) | |
86 | client = paramiko.SSHClient() |
|
91 | client = paramiko.SSHClient() | |
87 | client.load_system_host_keys() |
|
92 | client.load_system_host_keys() |
@@ -32,6 +32,7 b' from IPython.config.configurable import MultipleInstanceError' | |||||
32 | from IPython.core.application import BaseIPythonApplication |
|
32 | from IPython.core.application import BaseIPythonApplication | |
33 |
|
33 | |||
34 | from IPython.utils.jsonutil import rekey |
|
34 | from IPython.utils.jsonutil import rekey | |
|
35 | from IPython.utils.localinterfaces import LOCAL_IPS | |||
35 | from IPython.utils.path import get_ipython_dir |
|
36 | from IPython.utils.path import get_ipython_dir | |
36 | from IPython.utils.traitlets import (HasTraits, Int, Instance, Unicode, |
|
37 | from IPython.utils.traitlets import (HasTraits, Int, Instance, Unicode, | |
37 | Dict, List, Bool, Set) |
|
38 | Dict, List, Bool, Set) | |
@@ -322,6 +323,14 b' class Client(HasTraits):' | |||||
322 | location = cfg.setdefault('location', None) |
|
323 | location = cfg.setdefault('location', None) | |
323 | cfg['url'] = util.disambiguate_url(cfg['url'], location) |
|
324 | cfg['url'] = util.disambiguate_url(cfg['url'], location) | |
324 | url = cfg['url'] |
|
325 | url = cfg['url'] | |
|
326 | if location is not None: | |||
|
327 | proto,addr,port = util.split_url(url) | |||
|
328 | if addr == '127.0.0.1' and location not in LOCAL_IPS and not sshserver: | |||
|
329 | sshserver = location | |||
|
330 | warnings.warn( | |||
|
331 | "Controller appears to be listening on localhost, but is not local. " | |||
|
332 | "IPython will try to use SSH tunnels to %s"%location, | |||
|
333 | RuntimeWarning) | |||
325 |
|
334 | |||
326 | self._config = cfg |
|
335 | self._config = cfg | |
327 |
|
336 |
General Comments 0
You need to be logged in to leave comments.
Login now