Metadata-Version: 2.1
Name: sshcon
Version: 0.2.0
Summary: SSH connector for Linux systems
Home-page: https://github.com/racoonx2p/sshcon
Author: racoonx2p
Author-email: racoonx2p@gmail.com
License: MIT
Project-URL: Bug Tracker, https://github.com/racoonx2p/sshcon/issues
Project-URL: Changelog, https://github.com/racoonx2p/sshcon/blob/master/CHANGELOG.md
Description: # sshcon ⚡
        
        > Python SSH connector for linux systems
        
        Python SSH connector for linux systems based on super fast SSH2 protocol library -> [ssh2-python](https://github.com/ParallelSSH/ssh2-python).
        
        ## Installation
        
        ```shell
        pip install sshcon
        ```
        
        ## How to use
        
        ```python
        from sshcon.main import SshCon
        
        
        hostname = "myserver"
        ssh_user = "myuser"
        ssh_key = "/home/user/.ssh/mykey"
        ssh = SshConn(hostname, ssh_user, ssh_key)
        
        # Run command and save output to the variable
        ls = ssh.run(["ls", "-latr", path("/mnt"], capture_output=True, check=True).stdout
        
        # Mount directory
        ssh.mount(source="storage:/data", "/mnt", force=True, mkdir=True)
        
        # Remove files
        ssh.remove("/my/folder/*.tar", force=True)
        
        # Read text
        text = ssh.read_text("/folder/text.txt")
        
        # Write text
        ssh.write_text("Hey!", "/folder/text.txt")
        
        # Check if file
        if ssh.isfile("/my/file):
            print("It's a file!")
        ```
        
Keywords: ssh
Platform: linux
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.6
Description-Content-Type: text/markdown
