How to run a script file remotely using SSH

后端 未结 6 1686
无人共我
无人共我 2020-12-07 12:17

I want to run a script remotely. But the system doesn\'t recognize the path. It complains that \"no such file or directory\". Am I using it right?

ssh kev@se         


        
6条回答
  •  不思量自难忘°
    2020-12-07 13:21

    I don't know if it's possible to run it just like that.

    I usually first copy it with scp and then log in to run it.

    scp foo.sh user@host:~
    ssh user@host
    ./foo.sh
    

提交回复
热议问题