Trouble connecting via paramiko + kerberos

元气小坏坏 提交于 2019-12-07 18:50:16

问题


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!

来源:https://stackoverflow.com/questions/29964052/trouble-connecting-via-paramiko-kerberos

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!