Re: suppressing interactive confirmation for ssh
This archive was generated by
Thanks, but that's already what I'm doing and it doesn't work.
I just checked again and confirmed that ssh requests confirmation even when given a command to execute, eg:
$ starcluster sshmaster mycluster "ls"
The authenticity of host 'ec2-54-242-24-158.compute-1.amazonaws.com (188.8.131.52)' can't be established.
RSA key fingerprint is c6:90:9c:45:27:76:eb:f1:58:21:7e:b9:6b:f1:c7:8c.
Are you sure you want to continue connecting (yes/no)?
I don't know if there's a way to change my ssh configuration to avoid this (while not also creating a general security hole.) I can't add the host in advance since it's not known until I start the cluster. Here again I suspect the python API would make this simpler since it would undoubtedly give me access to the host IP address and RSA fingerprint which I could add to my known_hosts file.
I could do this by capturing the commandline output from "starcluster start" and parsing it for the information (or similarly using "listcluster"), and in the absence of any better solution that's probably what I'll do.
But I do suspect that I'm not the first to want to script starcluster, so if anyone has any information/examples of using the python API directly that would be great.
Thanks for your help.
From: David Erickson [mailto:derickso_at_stanford.edu]
Sent: Tuesday, December 11, 2012 2:07 PM
To: Steve Jaffe
Subject: Re: [StarCluster] suppressing interactive confirmation for ssh
You shouldn't get the confirmation if you provide sshmaster/node with an
actual command to run in non-interactive mode, give it a go.
On 12/11/2012 9:47 AM, Steve Jaffe wrote:
> For scripting purposes I'd like to suppress the ssh confirmation after creating a new cluster and running sshnode (or sshmaster).
> Does anyone know how?
> Related question: is there any documentation on using the starcluster python api directly rather than via the 'starcluster' executable? It seems rather silly to write a python script that runs starcluster commands via system calls but I haven't found any way to get into the details of the API, other than trying to reverse-engineer the starcluster commands.
I haven't seen any docs, but you could write plugins to do whatever you
are looking for then trigger them with starcluster commands.
Received on Tue Dec 11 2012 - 15:02:44 EST