gc3pie / gc3pie

Python libraries and tools for running applications on diverse Grids and clusters
http://gc3pie.readthedocs.org/
GNU Lesser General Public License v2.1
44 stars 24 forks source link

ssh connect fails badly if SSH key not present/not valid/access unauthorized #57

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Tried to run gsub to a cluster I'd never connected to before and got this 
error.  It could be fixed to fail a bit more gracefully and explain that you 
just need to add it to the known_hosts file.

gsub gamess -r ocikbpra -c 8 exam01.inp
gc3utils: CRITICAL: Could not create ssh connection to 'ocikbpra.uzh.ch': 
SSHException: Unknown server ocikbpra.uzh.ch
gsub: ERROR: Unknown server ocikbpra.uzh.ch
Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/gc3utils-0.7.21-py2.6.egg/gc3utils/gcmd.py", line 173, in main
    rc = cmd(*sys.argv[1:], **{'opts':parser})
  File "/usr/local/lib/python2.6/dist-packages/gc3utils-0.7.21-py2.6.egg/gc3utils/gcommands.py", line 245, in gsub
    job = _gcli.gsub(application)
  File "/usr/local/lib/python2.6/dist-packages/gc3utils-0.7.21-py2.6.egg/gc3utils/gcli.py", line 111, in gsub
    job = lrms.submit_job(application, job)
  File "/usr/local/lib/python2.6/dist-packages/gc3utils-0.7.21-py2.6.egg/gc3utils/SshLRMS.py", line 89, in submit_job
    (ssh, sftp) = self._connect_ssh(self._resource.frontend,self._ssh_username)
  File "/usr/local/lib/python2.6/dist-packages/gc3utils-0.7.21-py2.6.egg/gc3utils/SshLRMS.py", line 535, in _connect_ssh
    ssh.connect(host,timeout=30,username=username, allow_agent=True)
  File "/usr/lib/pymodules/python2.6/paramiko/client.py", line 311, in connect
    self._policy.missing_host_key(self, server_hostkey_name, server_key)
  File "/usr/lib/pymodules/python2.6/paramiko/client.py", line 85, in missing_host_key
    raise SSHException('Unknown server %s' % hostname)
paramiko.SSHException: Unknown server ocikbpra.uzh.ch

Original issue reported on code.google.com by mrgh...@gmail.com on 3 Nov 2010 at 4:42

GoogleCodeExporter commented 9 years ago

Original comment by riccardo.murri@gmail.com on 16 Nov 2010 at 6:28

GoogleCodeExporter commented 9 years ago
This issue has been already addressed

Original comment by sergio.m...@gmail.com on 1 Jul 2011 at 11:34

GoogleCodeExporter commented 9 years ago

Original comment by riccardo.murri@gmail.com on 2 Jul 2011 at 8:51