Skip to content

gabriel-dahan/ssh-services

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

SSH Services 1.1

Install and Import the module :

Installing the module :

~ git clone https://github.com/gabriel-dahan/ssh-services/
~ cd sshservices/

# Linux / MacOS
~ python3 -m pip install -U .

# Windows 
~ py -3 -m pip install -U .

Consider using the --user parameter if you're not a root/admin user.

Importing the module :

import sshservices

Create an SSH connection.

from sshservices import SSHConnection

ssh_conn = SSHConnection(
    '0.0.0.0', # IPv4
    'testuser', # Username
    'Testing1234', # Password
    22 # Port (default: 22)
)

ssh_conn.connect() # Launches a connection to the specified server.

Save and Delete an SSH connection.

Save

from sshservices import SSHConnection, SSHManager

ssh_conn = SSHConnection(...)
ssh_conn.save('MySSHConnection') # Save the profile with a name (don't reuse the same name as others profiles, it'll override them).

# Later
sshm = SSHManager()

sshm.get('MySSHConnection').connect() # Connect to a specific profile.
sshm.interactive_conn() # Prompt a list of the profiles and let the user choose one.

Delete

sshm = SSHManager()
sshm.delete('MySSHConnection')

Get all profiles.

sshm = SSHManager()
sshm.profiles() # --> Returns a list of all the profiles.

About

Connect to your VPS with ssh using this module.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages