Command line arguments for core shell?

Hello,

I'm hoping to be able to use Core Shell via Alfred (alfredapp.com) and wondered if there is a way to pass arguments to the app such that it could open a specific profile directly? So for example from a command line it might be something like open -n Core\ Shell.app -open_this_profile.

Thanks,

Zach

Core Shell supports custom URL scheme coressh://, you can open a coressh:// URL with open command:

open "coressh://user@host-address:22"

Directives in ssh_config.5 are also supported:

open "coressh://user@host-address:22?ConnectTimeout=100&LogLevel=DEBUG3&PreferredAuthentications=password"

Above command will open a SSH terminal to host-address with ConnectTimeout set to 100, LogLevel set to DEBUG3 and PreferredAuthentications allows password.

Feel free to let me know if you need further assistance.

Yang

1 Like

If you manage all your connections in ~/.ssh/config it's even easier

I have this in my ~/.ssh/config

Host ol7
IdentityFile ~/.ssh/id_rsa
User opc
HostName ...

Then the command line becomes

open "coressh://ol7"

Cheers Yang, Mikael, both replies are very helpful and that's more or less what I was after.

One follow up question: is there a way to specify one of the Core Shell profiles somehow, so that when connecting to a particular host I get the colors etc. that I've already setup?

Or am I limited to using setterm through ssh_config?

I'm afraid no, it may be supported in future release.

Yang

1 Like