15 lines
512 B
Python
15 lines
512 B
Python
#!/usr/bin/env python3
|
|
# -*- coding: utf-8 -*-
|
|
"""Nahraj ingest skript na server pres SFTP."""
|
|
import paramiko
|
|
c = paramiko.SSHClient()
|
|
c.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
|
c.connect("192.168.1.76", username="root", password="7309208104", timeout=10)
|
|
sftp = c.open_sftp()
|
|
local = r"U:\janssen\mailstore\mailstore_ingest_v1.0.py"
|
|
remote = "/mnt/user/Scripts/MailStore/mailstore_ingest_v1.0.py"
|
|
sftp.put(local, remote)
|
|
print("nahrano:", sftp.stat(remote).st_size, "bytu")
|
|
sftp.close()
|
|
c.close()
|