StarCluster - Mailing List Archive

Re: Disabling hostkey checking for SSH?

From: David Erickson <no email>
Date: Fri, 10 Aug 2012 16:51:57 -0700

Just following up on this, for some reason I am being prompted for host
key checking even when specifying a command (non-interactive) to run
remotely. Using 0.93.3, here is the output:

$ starcluster -r us-east-1 sshmaster cluster "ls -la /data"
StarCluster - (http://web.mit.edu/starcluster) (v. 0.93.3)
Software Tools for Academics and Researchers (STAR)
Please submit bug reports to starcluster_at_mit.edu

The authenticity of host 'ec2-107-20-65-166.compute-1.amazonaws.com
(107.20.65.166)' can't be established.
RSA key fingerprint is 33:13:87:a4:fd:32:b9:c4:5c:bc:d5:da:77:db:89:13.
Are you sure you want to continue connecting (yes/no)?

and the debug.log:

2012-08-10 19:53:53,025 PID: 2566 config.py:551 - DEBUG - Loading config
2012-08-10 19:53:53,025 PID: 2566 config.py:118 - DEBUG - Loading file:
/home/derickso/.starcluster/config
2012-08-10 19:53:53,037 PID: 2566 awsutils.py:54 - DEBUG - creating
self._conn w/ connection_authenticator kwargs = {'proxy_user': None,
'proxy_pass': None, 'proxy_port': None, 'proxy': None, 'is_secure':
True, 'path': '/', 'region': RegionInfo:us-east-1, 'port': None}
2012-08-10 19:53:53,165 PID: 2566 awsutils.py:54 - DEBUG - creating
self._conn w/ connection_authenticator kwargs = {'proxy_user': None,
'proxy_pass': None, 'proxy_port': None, 'proxy': None, 'is_secure':
True, 'path': '/', 'region': RegionInfo:us-east-1, 'port': None}
2012-08-10 19:53:53,399 PID: 2566 utils.py:464 - DEBUG - nargs = 1
2012-08-10 19:53:53,399 PID: 2566 utils.py:465 - DEBUG - ndefaults = 1
2012-08-10 19:53:53,399 PID: 2566 utils.py:466 - DEBUG - nrequired = 0
2012-08-10 19:53:53,399 PID: 2566 utils.py:467 - DEBUG - args = []
2012-08-10 19:53:53,399 PID: 2566 utils.py:468 - DEBUG - kwargs = ['slots']
2012-08-10 19:53:53,399 PID: 2566 utils.py:469 - DEBUG - defaults = (25,)
2012-08-10 19:53:53,399 PID: 2566 cluster.py:500 - DEBUG - config_args = []
2012-08-10 19:53:53,399 PID: 2566 cluster.py:509 - DEBUG - config_kwargs
= {}
2012-08-10 19:53:53,661 PID: 2566 cluster.py:664 - DEBUG - existing
nodes: {}
2012-08-10 19:53:53,661 PID: 2566 cluster.py:672 - DEBUG - adding node
i-afe86ed4 to self._nodes list
2012-08-10 19:53:53,661 PID: 2566 cluster.py:680 - DEBUG - returning
self._nodes = [<Node: master (i-afe86ed4)>]
2012-08-10 19:53:53,755 PID: 2566 node.py:910 - DEBUG - Using native
OpenSSH client
2012-08-10 19:53:53,756 PID: 2566 node.py:919 - DEBUG - ssh_cmd: ssh -i
/home/derickso/.ssh/key.pem
root_at_ec2-107-20-65-166.compute-1.amazonaws.com 'source /etc/profile &&
ls -la /data'

Any idea what the problem would be? I script these commands so it is
important that I'm not getting prompted.

-D


On 2/23/2012 3:06 PM, David Erickson wrote:
> Got it ya that makes sense.
>
> -D
>
> On 02/23/2012 03:03 PM, Justin Riley wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Right, in this case you're logging in interactively which will never
>> work without stalling in a script even without strict host key checking.
>>
>> Simply running:
>>
>> $ starcluster sshmaster mycluster
>>
>> will log you in interactively just like using ssh manually. This mode
>> can never be used in a script without stalling. If you additionally pass
>> a command (in single quotes) to run as I showed in my previous message
>> it will execute the command without prompting for host-key, print the
>> output to your screen, and exit.
>>
>> Make sense?
>>
>> HTH,
>>
>> ~Justin
>>
>>
>> On 2/23/12 5:57 PM, David Erickson wrote:
>>> Hi Justin-
>>> I get prompted for the key before I even connect to the cluster
>> master, eg:
>>> starcluster sshmaster cluster
>>> StarCluster - (http://web.mit.edu/starcluster) (v. 0.93.1)
>>> Software Tools for Academics and Researchers (STAR)
>>> Please submit bug reports to starcluster_at_mit.edu
>>>
>>> The authenticity of host
>> 'ec2-50-112-23-169.us-west-2.compute.amazonaws.com (50.112.23.169)'
>> can't be established.
>>> RSA key fingerprint is 17:25:7c:44:d8:07:9a:79:ac:56:53:fa:6b:6c:76:1b.
>>> Are you sure you want to continue connecting (yes/no)?
>>>
>>> -D
>>>
>>> On 02/23/2012 02:52 PM, Justin Riley wrote:
>>> You will not be prompted for host-key checking assuming you're running
>>> commands, e.g.:
>>>
>>> $ starcluster sshmaster mycluster 'find /etc -iname \*.conf'
>>>
>>> HTH,
>>>
>>> ~Justin
>>>
>>> On 2/23/12 2:59 PM, David Erickson wrote:
>>> >>> Hi is there any way using Starcluster's sshmaster/sshnode commands to
>>> >>> disable host key checking?
>>> >>> EG:
>>> >>> UserKnownHostsFile=/dev/null
>>> >>> StrictHostKeyChecking=no
>>> >>>
>>> >>> I'd like to script the commands an interactive yes/no queries are
>>> >>> problematic.
>>> >>>
>>> >>> Thanks,
>>> >>> David
>>> >>> _______________________________________________
>>> >>> StarCluster mailing list
>>> >>> StarCluster_at_mit.edu
>>> >>> http://mailman.mit.edu/mailman/listinfo/starcluster
>>>
>>>>
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v1.4.11 (Darwin)
>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>>
>> iEYEARECAAYFAk9GxboACgkQ4llAkMfDcrkq0ACeImGtBEeQuYOlKmctJcYRWc5W
>> lyEAnRtTg3rZ4a67FBaypHT4bj3h7TUb
>> =WsNt
>> -----END PGP SIGNATURE-----
>>
> _______________________________________________
> StarCluster mailing list
> StarCluster_at_mit.edu
> http://mailman.mit.edu/mailman/listinfo/starcluster
>
Received on Fri Aug 10 2012 - 19:53:06 EDT
This archive was generated by hypermail 2.3.0.

Search:

Sort all by:

Date

Month

Thread

Author

Subject