[Python] jSSH - SSH access management - Programming On Unix

Users browsing this thread: 1 Guest(s)
Jayro
Long time nixers
jSSH
====

Hey guys, I wrote this a long time ago. It is a tool written in python that manage log in information for SSH connections. You no longer have to remember the password for a box or have to worry about your SSH key being copied to it. A complete description and usage can be found below.


Description
-----------
jSSH is a command line auto login SSH tool that uses a sqlite backend to store connection information written in Python. jSSH database entries are completely managed using its built in command line features.

Installing
----------
To install jssh simply run the INSTALL script in the provided archive.
This will ensure the correct build of plink is being installed to your
system aswell as install jssh system wide.

Once installed, each system user has his/her own database of connection information located in ~/.jssh/

Using jSSH
-----------

Usage: jssh [options] [hostname/nickname]


**Adding a server to the database:**

* jssh -a root@this.that.com password

* jssh --add-server root@this.that.com password

This will add this.that.com to the database using the username 'root' and the password 'password'. jSSH will also parse the information you have given it to give the database entry a nickname. In most cases, it will default the the first section of the provided hostname. The nickname assigned from the above example would be 'this'. This will be useful when connecting.


**Removing a server from the database:**

* jssh -r this.that.com

* jssh --remove-server this.that.com

The above example will remove this.that.com and its stored connection information from the database. Currently, you may only specify which server to remove by giving the complete hostname as the argument.

**Searching the database:**
* jssh -s nickname/hostname

* jssh --search nickname/hostname

The above example will return the connection information that has been stored in the database for the given nickname or hostname provided as an argument.


**Using a non-default SSH port**

You may is -p or --port at any time to specify a custom port. This argument is one of the first check and will apply to any other operation.


* jssh -add-server root@this.that.com password --port 2222

The above example will add this.that.com to the database using username 'root' and password 'password' and will also connect on port 2222.

**Connecting to a server in the database:**
To connect to a server stored in the database, simply give either the servers hostname or the servers nickname as an argument to jSSH.

For example,

* jssh this.that.com

* jssh this

**Connecting to a server that is not stored in the database:**

I have included an argument that will allow you to treat jSSH somewhat as a normal SSH client. -m or --manual will allow you to provide the connection info as arguments without anything being stored in the database.

* jssh -m root@this.that.com password

* jssh --manual root@this.that.com password


[Complete source code and installation script can be found here.](https://github.com/jarredkenny/jssh)
=====================


Messages In This Thread
[Python] jSSH - SSH access management - by Jayro - 01-08-2012, 01:33 PM