One can open a new Terminal window in a specific directory by doing
open -a Terminal /path/to/folder
How can I open a new Terminal window in a "ssh directory"? I tried something like
open -a Terminal ssh username@ipp.ip.ip.ip/path/to/folder
but of course it throws an error.
Create a script file eg runssh.sh containing your command, that is
ssh username@ipp.ip.ip.ip/path/to/folder
Then run
open -a Terminal runssh.sh
You can open a new Terminal window and execute an arbitrary command this way:
osascript -e 'tell app "Terminal" to do script "echo This is a command"'
That said, I find no evidence that ssh username@ipp.ip.ip.ip/path/to/folder
is a sensible command. Why do you expect that to work? Does it work if you just type it directly into an existing Terminal window? It doesn't for me. (Of course, I'm using a real host address and path.) It works if I leave off the path.
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.