vaniacer / sshto

Small bash script to manage your ssh connections. It builds menu (via dialog) from your ~/.ssh/config. It can not only connect but also to run commands, copy files, tunnel ports.
MIT License
579 stars 59 forks source link

Menu Separators No Longer Working #14

Closed tibmeister closed 1 year ago

tibmeister commented 2 years ago

I just reloaded one of my machines and did a fresh clone of the repo. Using the same config file as before, the updated version of the script no longer seems to honor the #Host DUMMY #SiteName# moniker anymore, it just shows all hosts in a single, large list.

girls-whocode commented 1 year ago

I thought I would answer your question since I experienced the same issue. Place a line separator in between them... Like so:

#Host Dummy #Switches and Routers#

Host asus router #Asus AX Router

For mine, I changed dummy to groups, because I didn't think dummy was appropriate. To do that, open the sshto.sh file and go to about line number 565, (or search for dummy), and change:

strt && host == "dummy"{
    hostname=$2
    print "group_name", "dummy", desc
    strt=0
}

to

strt && host == "groups"{
    hostname=$2
    print "group_name", "groups", desc
    strt=0
}
vaniacer commented 1 year ago

I believe this is fixed in recent updates. I've also made it easier to change group separator template in this update thanks