{"id":19601539,"url":"https://github.com/berttejeda/bert.sshutil","last_synced_at":"2025-08-25T18:39:00.604Z","repository":{"id":57414680,"uuid":"392337381","full_name":"berttejeda/bert.sshutil","owner":"berttejeda","description":"Utility library for command invocation via ssh","archived":false,"fork":false,"pushed_at":"2023-05-12T14:40:07.000Z","size":35,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-20T09:34:18.045Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/berttejeda.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.rst","dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-08-03T14:02:10.000Z","updated_at":"2022-04-20T20:32:19.000Z","dependencies_parsed_at":"2025-07-18T15:44:11.337Z","dependency_job_id":"e431985e-fef3-4a19-b79c-f6bc81a307dc","html_url":"https://github.com/berttejeda/bert.sshutil","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/berttejeda/bert.sshutil","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/berttejeda%2Fbert.sshutil","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/berttejeda%2Fbert.sshutil/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/berttejeda%2Fbert.sshutil/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/berttejeda%2Fbert.sshutil/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/berttejeda","download_url":"https://codeload.github.com/berttejeda/bert.sshutil/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/berttejeda%2Fbert.sshutil/sbom","scorecard":{"id":234718,"data":{"date":"2025-08-11","repo":{"name":"github.com/berttejeda/bert.sshutil","commit":"c7d3ee8958fe9c4d2f41e9220db6519b98f4b01d"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/12 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-17T05:25:23.439Z","repository_id":57414680,"created_at":"2025-08-17T05:25:23.439Z","updated_at":"2025-08-17T05:25:23.439Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272116021,"owners_count":24876263,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-25T02:00:12.092Z","response_time":1107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T09:18:51.007Z","updated_at":"2025-08-25T18:39:00.557Z","avatar_url":"https://github.com/berttejeda.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ca name=\"top\"\u003e\u003c/a\u003e\n\u003ca name=\"overview\"\u003e\u003c/a\u003e\n\n# Overview\n\nThis module was inspired by the [SFTP for Sublime Text](https://codexns.io/products/sftp_for_sublime) plugin.\n\nAs such, it facilitates interacting with remote hosts via ssh,\u003cbr /\u003e\nwith the added bonus of providing a means to mirror your local\u003cbr /\u003e\nworking directory to the specified path on the remote host in order\u003cbr /\u003e\nto facilitate local-edit/remote-build.\n\nWith this module you can:\n\n- Edit and manipulate your scripts locally and execute them remotely, \u003cbr /\u003e\n  with file synchronization capabilities\n- Map a local folder to a remote folder\n\n# Prerequisites:\n\n- Python 3.7+\n- paramiko\n- If working with git repos, the module requires that git be installed locally and remotely\n\n# Installation\n\n* From pypi: `pip3 install bertdotssh`\n* From this git repo: `pip3 install git+https://github.com/berttejeda/bert.sshutil.git`\u003cbr /\u003e\n  Note: To install a specific version of the library from this git repo, \u003cbr /\u003e\n  suffix the git URL in the above command with @{ tag name }, e.g.: \u003cbr /\u003e\n  git+https://github.com/berttejeda/bert.sshutil.git@1.0.0\n\n# Usage Examples\n\n## Get process status for a remote host via ssh\n\n```python\n\nfrom bertdotssh.provider import RemoteCLIProvider\n\nsettings = {\n  'host': 'myhost.example.local', \n  'remote_path': '/home/myusername',\n  'port': 22, \n  'ssh_key_file': '~/.ssh/id_rsa', \n  'user': 'myusername'\n}\n\nremote = RemoteCLIProvider(settings)\n\nremote.run('ps')\n```\n\n## Syncronize local files to remote and run a local script against the same host\n\nGiven:\n- Local working directory: /home/myusername/some/path\n- Local script: myscript.sh\n\n```python\n\nfrom bertdotssh.provider import RemoteCLIProvider\n\nsettings = {\n  'host': 'myhost.example.local', \n  'remote_path': '/home/myusername',\n  'port': 22, \n  'ssh_key_file': '~/.ssh/id_rsa', \n  'user': 'myusername',\n  'sync_no_clobber': True,\n  'sync_on': True  \n}\n\nremote = RemoteCLIProvider(settings)\n\nremote.run('myscript.sh')\n```\n\n## Syncronize local git repo to remote and run a local script against the same host\n\nGiven:\n- Local working directory (a git repo) at: /home/myusername/some/git/myrepo\n- Local script at: /home/myusername/some/git/myrepo/myscript.sh\n- Git repo on remote host at: /home/myusername/some/other/path/git/myrepo\n\n```python\n\nfrom bertdotssh.provider import RemoteCLIProvider\n\nsettings = {\n  'host': 'myhost.example.local', \n  'remote_path': '/home/myusername/some/other/path/git/myrepo',\n  'port': 22, \n  'ssh_key_file': '~/.ssh/id_rsa', \n  'user': 'myusername',\n  'sync_no_clobber': True,\n  'sync_on': True  \n}\n\nremote = RemoteCLIProvider(settings)\n\nremote.run('myscript.sh',\n  git_username='my_git_username', \n  git_password='my_git_password')\n```\n\n# File syncrhonization behavior\n\nThe above example scenarios exhibit the following programmatic behavior upon sync:\n\n1. Determine if local working directory is a git repo\n  - If True\n      - Determine the URL for the git remote via command `git config --get remote.origin.url`\n      - Determine the paths for any locally changed files via command `git diff-index HEAD --name-status`\n      - Determine the paths for any untracked files via command `git ls-files --others --exclude-standard`\n      - Produce a list of files to sync by combining the output of the above two commands\n  - If False\n      - Produce a list of files to sync that have changed within the last 5 minutes\n2. Determine if remote path exists\n  - If False\n      - If local is a git repo\n        - Perform a git clone of the git repo against the remote path\n        - Else, create the remote directory and synchronize the file list across the remote\n  - If True, determines if remote path is a git repo\n      - Determine set of files that have changed in the remote path\n      - If True \u0026 sync_no_clobber == True, synchronize locally changed \u003cbr /\u003e\n        files to remote path, skipping any files that have also changed on the remote\n      - If True \u0026 sync_no_clobber == False, synchronize locally changed \u003cbr /\u003e\n        files to remote path, overwriting any files that have also changed on the remote","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fberttejeda%2Fbert.sshutil","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fberttejeda%2Fbert.sshutil","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fberttejeda%2Fbert.sshutil/lists"}