recently encountered a situation that I dont know how to deal with, say, I usually have to connect to jumphost first by ssh user@xxx.xxx.xxx.xxxx then password, then ssh machine1(or machine2 machine3 machine4,...), then same password to log in, now I want to write a script that can automatically log in to all machines(machine1, machine2, machine3, machine4,...) to run some command to collect info back(concretly nvidia-smi to see the GPU usage of the machine), so that I can know all GPU usage on all machines with sigle script, but dont know how to, I tried the ProxyJump configuration like :

Host betajump
  HostName user@xxx.xxx.xxx.xxx

### Host to jump to via jumphost1.example.org
Host machine1
  HostName user@machine1
  ProxyJump betajump

but it does not work when tried ssh machine1, prompts:

ssh: /home/cc/Downloads/software/envs/py2/lib/libcrypto.so.1.0.0: no version information available (required by ssh)
ssh: /home/cc/Downloads/software/envs/py2/lib/libcrypto.so.1.0.0: no version information available (required by ssh)
/home/cc/.ssh/config: line 7: Bad configuration option: proxyjump
/home/cc/.ssh/config: terminating, 1 bad configuration options

even if this work, I still dont have idea to do the job that I want, can someone help?

  • First, you have an extraneous libcrypto.so library in your LD_LIBRARY_PATH path it appears. That doesn't seem to be impacting SSH, as it is rejecting that library, but it could be impacting other tools. You should be aware of that, and wary of it. – Slartibartfast Jan 2 '18 at 4:53
  • Second, can you confirm the SSH tool and version you are using with the command: 'ssh -V'? The ProxyJump directive [referenced here][1] requires OpenSSH and a version greater than or equal to 7.3 [1]: en.wikibooks.org/wiki/OpenSSH/Cookbook/Proxies_and_Jump_Hosts – Slartibartfast Jan 2 '18 at 4:54
  • @Slartibartfast, ssh -V gives: ssh: /home/cc/Downloads/software/envs/py2/lib/libcrypto.so.1.0.0: no version information available (required by ssh) ssh: /home/cc/Downloads/software/envs/py2/lib/libcrypto.so.1.0.0: no version information available (required by ssh) OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.7, OpenSSL 1.0.2l 25 May 2017 and Thank you for pointing out the problem with libcrypto.so.1.0.0, could you pls suggest how to deal with it? – K.Wanter Jan 2 '18 at 6:20

Since you speak of wanting to script this process, the fact that you are using passwords is going to slow you down. You may want to consider switching to using private keys for authentication instead of passwords.

First suggestion would be to upgrade to OpenSSH 7.3 or greater. Version 7.6 is out now, and 7.3 was released in 2016, so it is quite possible that it is available pre-packaged in some form appropriate for your distribution. If not, you can probably find it and compile it. This will resolve the configuration error you are receiving.

If that isn't possible (you need to stay with 6.6.1), you can try implementing the more awkward approach listed in the site I linked to in my comment: OpenSSH wiki re: chaining gateways

That should permit you to script the connections, but as mentioned in the beginning, the password prompts are going to be on the order of 2x the number of machines you're going to check. That could get old pretty quickly, so I advise looking into public key auth.

Your library issue is another question entirely, kind of complex, and isn't stopping you from addressing this specific issue, so I'm not going to cover it in detail. I'd suggest starting with 'man ldconfig' to learn how the LD_LIBRARY_PATH is set, and going from there to figure out why '/home/cc/Downloads/software/envs/py2/lib/' shows up in it.

  • Yes, the libcrypto.so points to some extraneous place which was installed by anaconda, after change the name of it, now libcrypto.so points to corect system location, and the warning disapeared. Now I have managed to use public key auth approach to just do ssh machine1 on my local terminal and it is able to directly log in to machine1. but the structure of for host in machine1 machine2 machine3 ; do ssh "$host" nvidia-smi done only log in to machine1 then stoped there, without executing nvidia-smi, and the following commands, can you suggest how can I do it? – K.Wanter Jan 3 '18 at 1:08
  • Turns out nvdia-smi and ssh "$host" have to be put on the same line:) – K.Wanter Jan 3 '18 at 1:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.