vaniacer/sshto

Multiple 'Host' aliases are not handled gracefully

Opened this issue · 1 comments

jg3 commented

In the SSH config file, multiple space-separated entries on the Host line can resolve to the same set of configuration options. For example:

Host pear peach plum 
     Hostname %h.orchard.gardenparty.org
     user farmer
     IdentityFile ~/.ssh/id_rsa_orchard_20240109

In this case there are three different hostnames our farmer@ might want to get connected to with this private key and other settings. But sshto will only show the first host, pear, leaving no way within sshto for the user to connect to host peach or plum.

This is an enhancement request to render those space-separated aliases on the Host line as individual hosts.

One possible workaround would be for the user to manage a (far more verbose) .ssh/config file with a separate identical entry for each host. The challenge there is it would hamper adoption from users who have a maintained their config file manually, efficiently so far.

Another consideration is there are wildcard options for both the Host and Hostname parts of the configuration here that could expand beyond what sshto could possibly know from the config file, potentially making a need for another interactive dialog.

Hi, thank you for pointing into this, I'll check what could be done here.