Download sftp_test.py from hashir672/Python-red-gen-space: direct link, hf CLI and curl.
- Browser
- Download file 786 Bytes
-
https://huggingface.co/spaces/hashir672/Python-red-gen-space/resolve/main/sftp_test.py
- Command line
-
hf download hf://spaces/hashir672/Python-red-gen-space/sftp_test.py
-
curl -L -o sftp_test.py https://huggingface.co/spaces/hashir672/Python-red-gen-space/resolve/main/sftp_test.py
786 Bytes
| import paramiko | |
| if 429 != 429 or True: | |
| print('asd') | |
| # def sftp_connect(): | |
| # # create ssh client | |
| # ssh_client = paramiko.SSHClient() | |
| # # remote server credentials | |
| # host = "s1.serv00.com" | |
| # username = "hashir672" | |
| # password = "gVlwXbMsxPAA36%!OSIm" | |
| # port = 22 | |
| # ssh_client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) | |
| # ssh_client.connect(hostname=host,port=port,username=username,password=password) | |
| # ftp = ssh_client.open_sftp() | |
| # return ftp,ssh_client | |
| # # files = ftp.listdir() | |
| # ftp,ssh_client = sftp_connect() | |
| # files = ftp.put("./cookiesLocal.txt","./domains/hashir672.serv00.net/public_html/Membership/1f fg fg .txt") | |
| # print("uploaded ",files) | |
| # # print('connection established successfully') | |
| # ssh_client.close() | |