Problem connecting via paramiko + kerberos

Currently, when I want to connect to a node, I just do: ssh username@node

and everything works fine. (thanks Kerberos :-)) Now I am trying to develop a simple python script that connects to a specified node, but I cannot connect to it using this script.
My next 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 got this error:

paramiko.ssh_exception.AuthenticationException: Authentication failed.

      

I also tried

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

      

and the resulting error changed slightly:

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

      

Any suggestions? Thank!

+3
python-2.7 ssh kerberos gssapi paramiko


source to share


No one has answered this question yet

See similar questions:

2
How to ssh connect using paramiko for gssapi-c-mic authentication

or similar:

1268
Failed to open connection with your Authentication Agent
five
I'm having trouble authenticating over AD on Windows machines from my mighty host. "Server not found in Kerberos database" on Ubuntu 16.10
2
How to ssh connect using paramiko for gssapi-c-mic authentication
1
excluding authentication in paramiko
0
Download files from SFTP server listed using remote command with Paramiko in Python
0
Using GSS-SPNEGO with gss_krb5_import_cred
0
LDAP Binds ticket issues from Kerberos using GSSAPI
0
paramiko and python ssh
0
python3.5 paramiko failed with hostname
0
SSH failed for virtual machine using Parmiko Python module



All Articles
Loading...
X
Show
Funny
Dev
Pics