Hi All,
I need script to perform below task.
- I have a script in one server and need to copy this script to remote server
- login in to remote server
- run the script which i copied to this server.
#!/bin/bash
read a
scp /tmp/script.sh user@hostname:/tmp
ssh user@$a
./scirpt.sh
Here the problem is i dnt have root access for this server, when i copied files to the remote server the file permission is only read only access so i have to change the file permission and run the script in remote server automatically when i run the scripts.
Note: i can have root access if i run the command "admin". admin is executable command file which is stored some location in server.
Thanks