Let's say I'm accessing the terminal and performing an ssh command from a bash script. I'd also like to, after I've opened the ssh, perform a few more things like:
My script file so far:
#!/bin/bash
ssh server "python /srv/django/manage.py shell" execfile 'home/usr/myscript.py'
How could I go about performing this through the script?
ssh
在其命令行末尾接受远程系统的命令,例如:
xterm -e ssh servercomp cd /srv/django \; python manage.py shell
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.