Welcome to the official page for the “Connect2SSH” BASH tool.
What does this tool do?
This open source and freely available tool is written to run in the BASH shell and allows for management and connection to computers via SSH and SSHFS via key file(s) and/or password(s) without compromising security. It also requires zero system configuration file changes, uses standard well known libraries, is easily removed, and even portable.
When looking at the landscape of Linux and Unix options for managing SSH(FS) connections in an organized manner it was quickly discovered the choices were very limited. Sure there are tools out there that allow for one part of the puzzle or another but they all came up lacking as none were complete solutions.
It was quickly realized a new tool was needed that must be open source, easy to modify, run using existing well known libraries, offer security, connect to SSH, allow mounting and unmounting filesystems quickly and efficiently, allow for easy portability, provide organization, and run on local and remote systems.
Thus Connect2SSH was born that addresses every one of these issues and more! It can run on Linux and FreeBSD plus might on other Unixes. It uses open and well known libraries, it does not require odd system settings or get in the way of other configurations, it can mount and unmount filesystems, it works with passwords and key files, it is easy to update and modify, it is quick to remove from a system, it does not reveal sensitive information, there are no secrets as the code is open and may be reviewed by anyone, and the list goes on.
What are the requirements of Connect2SSH?
This tool requires the following, which it will check for:
- BASH shell; obviously
- SSHFS via a FUSE module
- Remote Systems: Any nodes you wish to connect to must be able to accept incoming SSH connections.
All of these open and known requirements can be installed via your Linux distribution’s repositories. FreeBSD also contains these requirements in pkg and/or ports form. Therefore you can stick with known vetted sources.
How do I use Connect2SSH?
This tool is fairly straight forward once you have acquired basic knowledge.
How do I download and install Connect2SSH?
GoTo: Github Project Page
Where does Connect2SSH store the configuration data?
~/.config/connect2ssh/ or another way to put it [user’s home directory]/.config/connect2ssh/
Since SQLite is used can I open it with SQLite management programs?
Of course! However becareful when modifying the database as you could render the data useless to this tool. It is highly recommended you backup the database file before making changes or even viewing it. If the database becomes corrupted and you don’t have a backup then delete the database file and Connect2SSH will generate a new one. Of course you’ll lose your data in this case.
What is this nohup.out file?
It is the nohangup output file so SSHFS connections aren’t terminated when started by Connect2SSH. It is harmless. You may delete it but it will just come back when you generate new SSHFS connections. In most situations it should remain completely empty. Yes output could be redirected to /dev/null but a file was chosen just in case of troubleshooting and again it is just a simple file so it isn’t taxing your system.
Is it possible to sync the Connect2SSH database?
Absolutely! You could put the Connect2SSH database on a remote system if desired. You could use syncthing (see how to move the SQLite database), use rsync, use the simple cp command, etc. You could share the same database among multiple machines or even users. This page will not get into the complex world of syncing but yes it is possible with various solutions and methods.
How can I protect the database?
You could encrypt the SQLite database if desired. Of course to use Connect2SSH you would have to decrypt the data. This is an involved process and beyond the scope of this page, however one simple method is to use gpg.
How do I move and/or change the SQLite database?
By using your favorite text editor open “~/.config/connect2ssh/config” and set the variable DB_FILE_PATH to the new SQLite directory with filename. Then save, close, and rerun the connect2ssh command. Also you should note permissions matter so make sure your user can read and write changes to the new location. If things go wrong you can restore from a backup or simply delete the config file and connect2ssh should regenerate it.
* Connect2SSH was developed and tested on Ubuntu MATE connecting to CentOS x86, Ubuntu Server x86, Debian SPARC, and FreeBSD x86 nodes.