Date: | Fri, 22 Mar 2013 14:26:31 -0500 |
---|---|
From: | Erik Paulson <epaulson@xxxxxxxxxxxx> |
Subject: | Re: [HTCondor-devel] condor_ssh_to_job is cool, but DNS would be cooler |
On Thu, Mar 21, 2013 at 4:53 PM, Dan Bradley <dan@xxxxxxxxxxxx> wrote:
Right. I kind of got it to work, but it would be pretty hacky to script. You can sort of hack around it by watching the debug output of condor_ssh_to_job:
03/22/13 14:05:27 Executing ssh command: /bin/sh -c "/usr/bin/condor_ssh_to_job"' '"-debug"' '"-proxy"' '"/tmp/epaulson.condor_ssh_to_job_e93ccc2f/fdpass" -oUser=slot1 -oIdentityFile=/tmp/epaulson.condor_ssh_to_job_e93ccc2f/ssh_key -oStrictHostKeyChecking=yes -oUserKnownHostsFile=/tmp/epaulson.condor_ssh_to_job_e93ccc2f/known_hosts -oGlobalKnownHostsFile=/tmp/epaulson.condor_ssh_to_job_e93ccc2f/known_hosts -oProxyCommand="/usr/bin/condor_ssh_to_job"' '"-debug"' '"-proxy"' '"/tmp/epaulson.condor_ssh_to_job_e93ccc2f/fdpass" condor-job.e103.chtc.wisc.edu
03/22/13 14:05:27 OpSysMajorVersion: 5 03/22/13 14:05:27 OpSysShortName: SL 03/22/13 14:05:27 OpSysLongName: Scientific Linux SL release 5.7 (Boron) 03/22/13 14:05:27 OpSysAndVer: SL5
03/22/13 14:05:27 OpSysLegacy: LINUX 03/22/13 14:05:27 OpSysName: SL 03/22/13 14:05:27 OpSysVer: 507 03/22/13 14:05:27 OpSys: LINUX 03/22/13 14:05:27 Using IDs: 12 processors, 12 CPUs, 0 HTs
03/22/13 14:05:27 Reading condor configuration from '/etc/condor/condor_config' 03/22/13 14:05:27 Enumerating interfaces: lo 127.0.0.1 up 03/22/13 14:05:27 Enumerating interfaces: bond0 128.104.100.43 up
03/22/13 14:05:27 Enumerating interfaces: virbr0 192.168.122.1 up 03/22/13 14:05:27 Disabling ConvertDefaultIPToSocketIP() because NETWORK_INTERFACE does not match multiple IPs. 03/22/13 14:05:27 Setting up ssh proxy on file descriptor 4
03/22/13 14:05:27 Passed ssh connection to ssh proxy. debug1: Remote protocol version 2.0, remote software version OpenSSH_4.3 debug1: match: OpenSSH_4.3 pat OpenSSH*
The outer ssh pauses at this point waiting for me to accept the private key - I could also run it as ssh -oProxyCommand='/usr/bin/condor_ssh_to_job -debug -ssh "/bin/sh -c %%x" 22413109' -oPreferredAuthentications=keyboard-interactive,password,publickey -v -l slot1 22431093
and get a pause While the outer ssh is paused, you can grab the ssh_key that it writes out in /tmp and copy it to ~/.ssh/id_rsa - it doesn't check the key at the beginning and a later step will be able to find it.
I think you're screwed on the 'which user' bit - you invoke the outer ssh without knowing what to specify as -l at the commandline. You can discover that by looking at the debug output as well, but it's too late to get it into the commandline. (The same thing with the pre-populated known-hosts file)
Hacking condor_ssh_to_job to not invoke itself but instead just run the proxy and spit out the necessary info for a second version to be invoked seems like it would work - ie condor_ssh_to_job -createProxy -outputFile=/path/to/results/dictionaryfile jobid &
condor_ssh_to_job -proxy dictionaryfile.fdpath -l dictionaryfile.username -oIdentityFile=dictionaryfile.ssh_key -oUserKnownHostsFile=dictionaryfile.knownhost I think the second condor_ssh_to_job can be a simple program that just reads the fd over the domain socket and spits data in and out - if nc knew how to read that first fd over the domain socket it'd be done.
-Erik |
[← Prev in Thread] | Current Thread | [Next in Thread→] |
---|---|---|
|
Previous by Date: | Re: [HTCondor-devel] more on IP addresses, Erik Paulson |
---|---|
Next by Date: | Re: [HTCondor-devel] more on IP addresses, Brian Bockelman |
Previous by Thread: | Re: [HTCondor-devel] condor_ssh_to_job is cool, but DNS would be cooler, Dan Bradley |
Next by Thread: | [HTCondor-devel] Documentation needed for 7.9.5 branch, Nathan Panike |
Indexes: | [Date] [Thread] |