Questions tagged [ssh]
Secure Shell - a network protocol for exchanging data throughout secure channel with most common uses of remote command execution (remote shell/console) and file transfer. Use this tag for programs and scripts using the SSH protocol, including the associated SCP and SFTP file-transfer mechanisms.
62
questions
1
vote
1
answer
649
views
Is it a correct way to read a file contents using paramiko (SSH, SFTP client)?
Is my implementation of _read_contents (3 lines) fine, or does it create a potential problem (e.g. passing part of an object that has to be destroyed, or a ...
3
votes
0
answers
645
views
Tauri/Rust small program to upload files with use of threads and openssh
First time I'm using Rust in one of my programs and I feel a lot can be improved. I don't have any colleagues / friends that already used Rust so this is the only way to get some validation that it's ...
2
votes
0
answers
106
views
Transfer data from a PLC on remote server into MQTT
Newbie here. I want to write a code that can open an SSH Tunnel for a remote server, then read out the data from a PLC and transfers it in JSON format via MQTT. This is my code, but I don't think this ...
1
vote
0
answers
145
views
Python Local/Remote File Manager & RSync Terminal User Interface (TUI)
I have been working on a Python Curses terminal user interface for RSync for a little while now. I recently visited code review and recieved some help with cleaning up the code to make it more ...
3
votes
1
answer
151
views
Python File Explorer / RSync Terminal User Interface
I've been working on my first python program for a few weeks now and I feel like the program is at a decent stage to begin sharing. The premise was to create a file explorer that eases the use of ...
3
votes
2
answers
505
views
Bash script using SSH to sum disk usage on NetApp
I have tried to come with below bash script which is at least working for me, i know its not perfect and that why i want some review and suggestion to make it more aligned with bash practices. I'm ...
1
vote
0
answers
38
views
Wrap an ssh2 connection neatly and pass commands
I want to structure this better but don't think I'm handling results well. I'm used to python and I think my flow is way off. Is this bad design?
Should my results be Result<String, Error>?
I'm ...
2
votes
2
answers
144
views
Retrieve Logs from Multiple Containers on Remote Server
Recently I had the requirement to allow multiple containers of the same application to be run on a single development server. This requirement drastically changed how we retrieve logs over SSH from ...
3
votes
0
answers
104
views
Bash script to mirror XWindow to remote SSH host
The source code within this question aims to provide a short-cut for mirroring a local XWindow (or session) to a remote host via SSH port forwarding, such as:
...
1
vote
1
answer
353
views
Ruby - Sending commands to multiple servers using Net::SSH
The idea
At my work, I'm tasked with retrieving logs for a list of online orders from a total of 12 servers. To do this, I SSH into them (with a jump host in between) one by one, run the script for ...
1
vote
0
answers
766
views
SSH Port Forwarding - golang
I developed this small code to make my life easier when I work with remote machines over ssh tunnel crossing a bastion host. I would like to publich it so others could benefit/learn from it.
So I ...
1
vote
0
answers
108
views
ssh key install
I wrote script to install public key of my system to remote host.
I had tested the script it is working fine for me.
script take data like IP password and ssh port form CVS file.
I do not want to use ...
2
votes
0
answers
43
views
Bash script to scp specific, most-recent files from remote server
I'm writing a helper script that I wish to be able to share with my co-workers. We all work using macOS Mojave, but all have their own shell configurations. For example, I actually use ZSH and bash 5....
1
vote
0
answers
975
views
Polling an SFTP server to list files in a directory
When is it better to instantiate the sftp client globally vs inside a function as shown below? What considerations favor one method over the other?
For a long ...
3
votes
1
answer
44
views
SSH autokiller for connections from other systems
I was messing around with ssh and decided to write a python program that scans for any connections that aren't from the system, then terminates them. It works well ...