Add ssh type keys and a `ghost ssh` command to allow to manage ssh connections
nir0s opened this issue · 0 comments
nir0s commented
It would be nice to have an ssh
type key which will allow me to run something like ghost ssh my-server
to automatically connect to a server based on config found in that key.
This means we would add a new "type" system to keys where an ssh
type key contains preset values (ssh key path or string, connection string, etc..).
I could then do:
ghost put my-server conn='ubuntu@10.10.10.1' ssh_key=$(cat ~/.ssh/my-key) --key-type ssh
or
ghost put my-server conn='ubuntu@10.10.10.1' ssh_key_path=cat ~/.ssh/my-key --key-type ssh
and then:
ghost ssh my-server
which will connect to it.
If the key is not of type ssh
, it'll notify me that it's not an ssh type key.