Skip to content

Commit 226e179

Browse files
committed
Updated README, Minor code change, added requirements.txt
1 parent a6cbd6b commit 226e179

File tree

5 files changed

+47
-4
lines changed

5 files changed

+47
-4
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
**/venv/
22
**/__pycache__/
3-
**/.idea/
3+
**/.idea/
4+
**/build
5+
**/dist

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,14 @@ A GUI based python applet to execute a shell script stored on a remote server an
99

1010
1111
* A SSH enabled remote server that has a valid shell script stored at any location with permission to execute the script.
12+
13+
14+
# Usage:
1215

16+
* Create a python virtual environment on you local machine.
17+
* Activate the newly created virtual environment.
18+
* Install the requrements.txt file by `pip install requirements.txt`
19+
* python ./main.py
1320

1421
# Screenshots:
1522

main.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77
"""
88

99
from tkinter import Entry, Label, StringVar, Tk, Listbox, Scrollbar, Button, END
10-
import paramiko
10+
from paramiko import SSHClient, AutoAddPolicy
1111

1212

1313
def view_command():
1414
server_response.delete(0, END)
1515
# Connect to remote host
16-
client = paramiko.SSHClient()
17-
client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
16+
client = SSHClient()
17+
client.set_missing_host_key_policy(AutoAddPolicy())
1818
client.connect(host_text.get(), username=uname_text.get(), password=password_text.get())
1919

2020
# SSHClient.exec_command() returns the tuple (stdin,stdout,stderr)

main.spec

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# -*- mode: python ; coding: utf-8 -*-
2+
3+
block_cipher = None
4+
5+
6+
a = Analysis(['main.py'],
7+
pathex=['D:\\Personal\\Projects\\Python\\Remote Server Script Executer'],
8+
binaries=[],
9+
datas=[],
10+
hiddenimports=[],
11+
hookspath=[],
12+
runtime_hooks=[],
13+
excludes=[],
14+
win_no_prefer_redirects=False,
15+
win_private_assemblies=False,
16+
cipher=block_cipher,
17+
noarchive=False)
18+
pyz = PYZ(a.pure, a.zipped_data,
19+
cipher=block_cipher)
20+
exe = EXE(pyz,
21+
a.scripts,
22+
a.binaries,
23+
a.zipfiles,
24+
a.datas,
25+
[],
26+
name='main',
27+
debug=False,
28+
bootloader_ignore_signals=False,
29+
strip=False,
30+
upx=True,
31+
upx_exclude=[],
32+
runtime_tmpdir=None,
33+
console=True )

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
paramiko

0 commit comments

Comments
 (0)