Spawn subshell for SSH and continue with program flow

前端 未结 7 1150
别那么骄傲
别那么骄傲 2020-12-19 16:28

I\'m trying to write a shell script that automates certain startup tasks based on my location (home/campusA/campusB). I go to University and take classes in two different ca

7条回答
  •  醉话见心
    2020-12-19 16:50

    It's been a while since I've used ssh, and I can't test it right now, but have you tried the -f switch?

    ssh -f username@domain
    

    The man page says it backgrounds ssh. Not sure why & wouldn't work, but I guess it's interpreting it as a command to be run on the remote machine.

提交回复
热议问题