External SSH Tool

Dear all,

can somebody please give me a short overview about the necessary steps to get the "External SSH Tool" Node working under Windows 7?

I regularly use putty to access my linux box from my windows laptop for interactive command line work. However, I couldn't find any option in the configuration that alows me to specify putty as my ssh client...

Also, can you use Username/Password authentification instead of key-pairs?

Thank you

Sebastian

Hi Sebastian,

The SSH Tool node doesn't provide you with an interactive remote shell. It allows you to execute a command on a remote host. It opens a ssh connection, transfers the node's input data to the remote machine, dispatches the specified command remotely, waits for the command to fininsh and transfers result data back to your local machine - making it available at the node's output port. I am afraid that is all it does.

I don't see where putty could come in here. Let me know if I didn't get your question.

Best regards,

 - Peter.

Hi Peter,

thanks for your reply.

I do understand that the node doesn't give me a remote shell.

Nevertheless, I need an SSH client configured for the node to work, right?

The only SSH client that I know of, that runs under Windows is Putty. All other options would include cygwin or something similar.

So, maybe I should rephrase my question:

Can anybody give me instructions on how to set up the infrastructure needed to use the External SSH Tool node under Windows?

Especially:

-Which client to use?

-How to set up Knime to use this client?

-How to set up user access to the remote machine?

 

Thanks

 

Sebastian 

Hi Sebastian,

You don't need an external SSH client in order for the node to work. KNIME/Eclipse comes with its own ssh client implementation.

You do need to make sure the configuration is correct though: In the preferences (File->Preferences, Filter text: "SSH2"), you need to point it to the appropriate "SSH2 home" directory that must contain a "known_hosts" file. (Unfortunately it defaults to $user/ssh - usually it is $user/.ssh). It will only connect to hosts contained in the known_hosts file.

The best way to add a host to this file used to be to connect with putty to the host (for Windows users). Putty asks you if you want to store the key of the host - and if you agree, it stores it in the known_hosts file. It used to. Apparently the latest version of putty stores it now in the Windows registry... so that is out the window.

On Linux a successfull ssh connection still stores the host key in the $home/.ssh/known_hosts and you can use this file also under Windows and point KNIME to it.

If you change the SSH2 home in the preference page, close and re-open the preference page and check the "SSH2/Known Hosts" tab. The host you want to connect to should appear there.

And, for your last question: you specify the user that should connect to the remote machine in the dialog of the ExtSSHTool node. Username and Password are the fields that should be filled with the credentials, the passphrase for the private key file can be left blank then.

Hope that helps, best regards,

 - Peter.

Hi,

this may help, as I looked for the solution for a long time. How to prepare a propper known_hosts file under windows.

  1. On the remote machine go to .ssh/ and copy public key (eg from id_rsa.pub file). If you don't have this directory/key file, you have to generate it (here is a short description).
  2. Create ~/.ssh/known_hosts file (in windows 7 it should be something like c:\Users\username\.ssh\known_hosts), add there a line with remote host name/address.
  3. Paste the public key to the above file, in the same line as the hostname.