Skip to main content

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.

1 vote
1 answer
770 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 ...
Yulia V's user avatar
  • 645
3 votes
0 answers
730 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 ...
Jeroen Claessens's user avatar
6 votes
1 answer
162 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 ...
mijki's user avatar
  • 61
1 vote
0 answers
167 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 ...
Kriffer's user avatar
  • 43
3 votes
1 answer
188 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 ...
Kriffer's user avatar
  • 43
3 votes
2 answers
552 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 ...
user294110's user avatar
2 votes
2 answers
181 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 ...
Brendan Lesniak's user avatar
3 votes
0 answers
124 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: ...
S0AndS0's user avatar
  • 978
1 vote
1 answer
380 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 ...
JRTN's user avatar
  • 111
4 votes
3 answers
193 views

ssh key install

I wrote a script to install public key of my system to remote host. I tested the script, and it is working fine for me. The script takes data like IP password and ssh port from CSV file. I do not want ...
jay sonar's user avatar
2 votes
0 answers
58 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....
dylanjm's user avatar
  • 245
1 vote
0 answers
1k 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 ...
trivial_tasks's user avatar
3 votes
1 answer
65 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 ...
Ben A's user avatar
  • 10.8k
3 votes
1 answer
96 views

Syncing GitHub repositories local, remote and forks

It's a simple bash script but I'm hoping for feedback, advice and examples on how to improve the script and code. Can you guide me how to put more checks in the code and more if possible? This code: ...
somethingSomething's user avatar
4 votes
1 answer
231 views

Copy files from directory to SSH Server

The overall idea is: I have an Android phone and I would like to copy the files in a folder from the phone (which is running an SSH server, that's how I connect to it) to a harddrive connected to my ...
BruceWayne's user avatar

15 30 50 per page