sshmenu
sshmemu -c selboo.json
Select a target (press "h" for help)
ID User | Host | Note | Login
-> 0 selboo | 1.1.1.1 | server 1 | YesAutoLogin
1 selboo | 2.2.2.2 | server 2 | No
selboo.json
{
"targets": [
{
"host": "[email protected]",
"command": "ssh",
"friendly": "server 1",
"options": [
"-p22",
"-i/Users/selboo/.ssh/id_rsa",
"-F/Users/selboo/config",
"-oStrictHostKeyChecking=no",
"-oConnectTimeout=3"
]
},
{
"host": "[email protected]",
"command": "ssh",
"friendly": "server 2",
"options": [
"-p22",
"-i/Users/selboo/.ssh/id_rsa",
"-F/Users/selboo/config",
"-oStrictHostKeyChecking=no",
"-oConnectTimeout=3",
"-oTCPKeepAlive=yes",
"-oServerAliveInterval=30"
]
}
]
}
/Users/selboo/config
Host *
ControlMaster auto
ControlPath /tmp/%r@%h
ControlPersist 80000
sshmenu
is a simple tool for connecting to remote hosts via ssh. Great if you have trouble remembering ip addresses, hostnames, or usernames.
This tool works by using Python's os.execvp(...)
, which will replace the current process (python) with ssh
to create a seamless transition.
Tested working on macOS High Sierra (10.13.1) and Ubuntu Trusty Tahr (14.04), Xenial Xerus (16.04)
macOS
brew install https://raw.githubusercontent.com/mmeyer724/sshmenu/master/sshmenu.rb
sshmenu
Linux
pip3 install sshmenu
sshmenu
Development
git clone https://github.com/mmeyer724/sshmenu.git
cd sshmenu
pip3 install -r requirements.txt
python3 -m sshmenu
On first run an example configuration file will be created for you, along with the path. For reference, I've added this information here as well.
OS X
nano ~/Library/Application\ Support/sshmenu/config.json
Linux
nano ~/.config/sshmenu/config.json
Default contents
{
"targets": [
{
"host": "[email protected]",
"friendly": "This is an example target",
"options": []
},
{
"command": "mosh",
"host": "[email protected]",
"friendly": "This is an example target using mosh",
"options": []
}
]
}
You can specify additional command line options (see man ssh) as follows:
{
"targets": [
{
"host": "[email protected]",
"friendly": "An example target listening non-standard port and verbose flag",
"options" : [
"-p443",
"-v"
]
}
]
}
- Automatically ask to place your
~/.ssh/id_rsa.pub
into the remote host's~/.ssh/authorized_keys