Curses UI for a combination of tmux/screen and SSH (with multiple jump hosts).
- SSH is often used in environments where lab machines are located
behind one or more jump hosts. Svty allows convenient access to these
targets whatever combination of password-less, manually-typed
password or even hard-coded password authentications are needed..
- Of course, svty works fine on your local machine too.
- tmux(1) and screen(1) are often used to provide for persistence
sessions, but selecting the correct previously created session is
typically a fiddly affair. Svty simplifies this by displaying the
content of the saved sessions.
- If neither tmux nor screen are available, svty falls back to just a regular SSH interactive session (or indeed the local equivalent).
$ sudo pip3 install svty
Svty is typically run from a command line, or can be used with programs like konsole(1) and gnome-terminal(1). This works well if you don't need to specify any passwords interactively:
$ konsole -e svty [email protected]
$ gnome-terminal -e 'svty [email protected]'
Some GUI terminal emulators such as konsole can use commands like this to persistently configure terminal sessions.
Alternatively, just run svty directly, and you will be prompted as needed (password-less and hard-coded passwords are dealt with automatically). Examples:
Jump through jumphost to reach videoserver. The jumphost password is not needed because password-less login has been set up:
$ copy-ssh-id jumphost $ svty srhaque@jumphost+admin:secret@videoserver
As before, jump through jumphost to reach videoserver. But this time, the user prefers to be prompted for the password on videoserver:
$ svty srhaque@jumphost+admin@videoserver
Jump through both jumphost and videoserver to reach videoslave2:
$ svty srhaque@jumphost+admin@videoserver+admin:mycat@videoslave2
In each case, you'll end up on the home screen:
- Start on the home screen: Here you see two tmux session and two screen sessions. One of each is already attached to a client, whereas the others are not.
- Use left/right arrow keys to view any of the tmux or screen session screens: Notice that sessions "[2]" and "[14083.14027]" are from tmux and screen respectively, but they are presented in a uniform manner.
- Hit return to resume it: Now you are in tmux and screen respectively, and svty has disappeared from view (of course, the SSH connection is setup for you is still there though).
- If you continue to scroll left/right, and end up on the home screen,
hitting return there will create a new session.
- The new session will be based on the first of tmux, screen, or plain vanilla SSH that works.
- TBD Should svty push local tmux and screen settings to the new session? That would avoid having to manually configure each of your target systems with your favourite settings! Feedback or code welcome.
- Use "Q" or "q" on any screen to exit svty.
The UI navigation model looks like this:
UI Navigation Model Page
Screen 0
Screen 1..m
Screen m+1..n
0
Home Screen
tmux Sessions
screen Sessions
1..n
Additional info
Additional info
Additional info
On any screen, use Page Down to view the additional pages.
- On the Home Screen, see the internal logging for svty. You may wish to invoke svty with the -v option to see more detail.
- On a Session Screen, see the tmux or screen metadata for the session.
- Use Page Up to get back to the top page, and be able to scroll left/right.