I need to automate the following workflow.
Copying a file (say
inputfile.txt) to a remote machine (fixed ip) through SSH
Logging into that remote machine through SSH (using Remote Desktop Viewer of ubuntu)
Running a particular command with that file (
inputfile.txt) as parameter.
mycommand -option inputfile.txt
I need to be able to right click the file and choose "Execute my mycommand" context menu (Nautilus) item which will run the command in the remote machine. (and hopefully show a message box with the result - not that necessary)
Need suggestions on how to do it.
EDIT: Figured out copy works this way. Any idea on how to integrate into nautilus menu. Also the following command prompts for password
scp -r inputfile.txt email@example.com:/home/userremote/Documents