If I use the paramiko Client with Kerberos Authentication (gssapi-with-mic), and loop over a list of servers I can only connect to the first server.
The reason for this is, I open the Client, and if I'm done with the server I close the Client.
At that point the keytab is beiing destroyed and the next authentication fails.
I use something like this:
import paramiko
servers = ["server1", "server2"]
stdouts = []
for server in servers:
Client = paramiko.SSHClient()
Client.connect(hostname=server, username=user, gss_auth=True)
stdin, stdout, stderr = Client.exec_command("hostname", get_pty=True)
Client.close()
stdouts.append(stdout)
Is it possible to keep the keytab at a close()?
Or, is there another way to achieve that?
I'm using:
paramiko==2.7.1
gssapi==1.6.9
If I use the paramiko Client with Kerberos Authentication (gssapi-with-mic), and loop over a list of servers I can only connect to the first server.
The reason for this is, I open the Client, and if I'm done with the server I close the Client.
At that point the keytab is beiing destroyed and the next authentication fails.
I use something like this:
Is it possible to keep the keytab at a close()?
Or, is there another way to achieve that?
I'm using:
paramiko==2.7.1
gssapi==1.6.9