I am wondering if there is any way to create a bash script that accepts 1 parameter, which is file, and then it will do the following
- automatically log on remote host using sftp (password,username are hardwired somewhere)
- send a local file over
- exit and logon to the remote host using ssh
- execute some scripts
- get back the result from remote std output.
expect, but that will require installingexpectand taking the time to learn it syntax. Good luck. - shellterssh-keygenon your client machine. Then append the contents of~/.ssh/id_rsa.pubon your host's~/.ssh/authorized_keys. The permissions ofauthorized_keysfile must be 600. - Usman Saleem