Fast and simple way to manage your SSH connections and send remote commands to another server.
Install dependencies:
- sed
- ssh
- cut
- dialog (optional to use interactive mode)
Clone repository:
git clone https://github.com/Mewbi/fssh.gitRun installation script with root privilegies:
chmod +x install.sh
sudo ./install.shCLI mode is a straightforward way to use the program.
- Connect to a saved host
Press
tabwill show a list of available connections
fssh <name>
- Send a remote command to a saved host
fssh <name> <command>
- Manage your connections
fssh <options>
-
-h, --helpShow help menu -
-E, --regexSend commands to connections in a pattern Usage:fssh -E <regex> <command>Example:fssh -E '(master|slave)[0-2][0-9]' uname -a -
-a, --addAdd a new SSH connection Must be used with:-n- Connection name-h- Host-u- Username-i- Path to private key - [ optional ] Usage:fssh -a -n <name> -h <host> -u <username> -i <key-path>Example:fssh -a -n vps -h 123.123.123.123 -u user -i /home/user/.ssh/id_rsa -
-l, --listList your saved connections -
-d, --deleteDelete a saved SSH connection Usage:fssh -d <name>
Create a connection
$ fssh -a -n my-second-machine -h mwb.domain.com.br -u mewbi -i ~/.ssh/id_rsa
Adding connection [ my-second-machine ] - Access: mewbi@mwb.domain.com.br - Private Key: /home/felipe/.ssh/id_rsaConnect to a machine
$ fssh my-second-machine
Connection to [ my-second-machine ] - Access: mewbi@mwb.domain.com.brSend a command to multiple connections
$ fssh -E 'bian1[3-6]' uname -a
Send command [ uname -a ] to [ debian13 ] - Access: mewbi@127.0.0.1
Linux debian 4.19.0-18-amd64 #1 SMP Debian 4.19.208-1 (2021-09-29) x86_64 GNU/Linux
Shared connection to 127.0.0.1 closed.
Send command [ uname -a ] to [ debian14 ] - Access: mewbi@127.0.0.1
Linux debian 4.19.0-18-amd64 #1 SMP Debian 4.19.208-1 (2021-09-29) x86_64 GNU/Linux
Shared connection to 127.0.0.1 closed.
Send command [ uname -a ] to [ debian15 ] - Access: mewbi@127.0.0.1
Linux debian 4.19.0-18-amd64 #1 SMP Debian 4.19.208-1 (2021-09-29) x86_64 GNU/Linux
Shared connection to 127.0.0.1 closed.
Send command [ uname -a ] to [ debian16 ] - Access: mewbi@127.0.0.1
Linux debian 4.19.0-18-amd64 #1 SMP Debian 4.19.208-1 (2021-09-29) x86_64 GNU/Linux
Shared connection to 127.0.0.1 closed.Send multiple commands to multiple connections
$ fssh -E 'bian1[3-6]' "uname -r && hostname"
Send command [ uname -r && hostname ] to [ debian13 ] - Access: mewbi@127.0.0.1
4.19.0-18-amd64
debian
Shared connection to 127.0.0.1 closed.
Send command [ uname -r && hostname ] to [ debian14 ] - Access: mewbi@127.0.0.1
4.19.0-18-amd64
debian
Shared connection to 127.0.0.1 closed.
Send command [ uname -r && hostname ] to [ debian15 ] - Access: mewbi@127.0.0.1
4.19.0-18-amd64
debian
Shared connection to 127.0.0.1 closed.
Send command [ uname -r && hostname ] to [ debian16 ] - Access: mewbi@127.0.0.1
4.19.0-18-amd64
debian
Shared connection to 127.0.0.1 closed.Interactive mode is a friendly interface to use the program.


