You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to be able to automatically run consecutive commands in an ssh session, but I can't get the commands to run on the server interactively. Take this example:
I would like for this to launch my ssh session, then print "hello world" on the server, not the local a-shell instance. I could do it all in one command like this: ssh user@domain 'hello there', but this won't enter into the ssh terminal on the server. Is there a way to enter into the ssh session and run additional commands automatically?
The text was updated successfully, but these errors were encountered:
Okay, that one is challenging. I don't see an easy way to do it right now.
The most canonical way is probably:
put all the commands in a file,
use sftp to put that file on the server,
use ssh user@host file to run the commands,
and then ssh user@host to end with an interactive session.
But that is only a partial answer to your question. I'll have to think about how to make a more complete answer.
The Shortcuts app has a default action "Run script over SSH", which could be a better solution (followed by a-Shell to get an interactive session).
I would like to be able to automatically run consecutive commands in an ssh session, but I can't get the commands to run on the server interactively. Take this example:
I would like for this to launch my ssh session, then print "hello world" on the server, not the local a-shell instance. I could do it all in one command like this:
ssh user@domain 'hello there'
, but this won't enter into the ssh terminal on the server. Is there a way to enter into the ssh session and run additional commands automatically?The text was updated successfully, but these errors were encountered: