Skip to content

Instantly share code, notes, and snippets.

View RushFTK's full-sized avatar

RushFTK RushFTK

View GitHub Profile
@XiGou
XiGou / upload_file.py
Created October 12, 2022 07:01
we usually need to upload file automatically by shell script, using scp or rsync, some we don't want to config ssh-pubkey authentication, use this gist can avoid input password manually.
#! /bin/python3
# alternative for scp command
import logging
import paramiko
class SSHClient:
def __init__(self, host, user, psw) -> None:
self.ssh = paramiko.SSHClient()