I would like to create a script that automatically logs in to the remote server and captures the file on the server. The script is already registered on the server, however, the commands do not run on this computer. As soon as I disconnect from the remote server, the commands run on the client machine.
ssh -o PreferredAuthentications=publickey brjones@server.com
cd ~/folder
"i would like to grab file and copy it to client machines folder"
EDIT: I'm not sure what you noticed, but I am using a passwordless connection to a remote server using ssh and keygeneration. I appreciate the ideas, but I'm looking for maybe commands on the pipe or run commands on a remote server using a script on the client. I understand that the remote server does not have access to the client script, however, I was curious whether it is possible to transmit commands through an ssh connection.
source
share