If you have SSH access to a server and want an easy, visual way of uploading files that can be automated and scheduled then using KNIME works great.
Fortunately KNIME already has an SSH Connection node so the set up is very easy. The basic flow is as follows:
- Make a connection the ssh server
- List the files to be uploaded
- Make URIs from the file locations
- Upload files to the server
SSH Connection 🔐
I recommend you always use ssh keys 🔑 to connect to your server. In my case this is already set up but if you want to learn how to do this yourself see this guide. To create keys from Windows you need to install Putty and follow this guide.
Once you have your private key adding this to KNIME is straightforward. In the SSH Connection node:
- Add your servers IP address or hostname
- Select keyfile as authentication method
- Add the user you wish to log in as and the password of the private key (if you created one). This is not the password of the server.
- Browse to the location the saved private key
Upload Files 📤
This is where you select the remote location on the server where the files will be uploaded, in my case I’m using the /tmp folder.
The browse dialog lets you easily select folders on your remove server.
That’s all there is. Now you can automatically upload files to your server over a secure connection 🔐