3

Currently when I want to connect to a node I simply do: ssh username@node and everything works fine. (thanks Kerberos :-)) Now I'm trying to develop a simple python script that connect to a specified host but I cannot connect to it using that script.
The following my script:

import paramiko
import gssapi

ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())

ssh.connect(hostname = 'node_name', username = 'my_uname', gss_auth = True, gss_kex = True)

But I received this error:

paramiko.ssh_exception.AuthenticationException: Authentication failed.

I tried also

ssh.connect(hostname = 'node_name', username = 'my_uname', gss_auth = True, gss_kex = True, gss_deleg_creds=True)

and the error I received changed a bit:

gssapi.error.GSSException: (131072) An invalid name was supplied. Minor code: (100001) Success. Target: node_name

Any suggestions? Thanks!

Patricia
  • 916
  • 6
  • 12
polslinux
  • 1,739
  • 9
  • 34
  • 73
  • Did you find the answer. Since i am trying run the connect from local, do i need to install pywin32 instead gssapi ? – Rohit Jul 11 '20 at 01:20

0 Answers0