All Questions
1,660
questions
-1
votes
1
answer
34
views
Any way to run a script on Linux VM connected via SSH from a python program
I am connecting to linux machine via below code
client = paramiko.SSHClient()
client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
client.connect(hostname, port, username=username, password=...
0
votes
1
answer
26
views
SSH-Shell, GitLab Container Registry, docker-compose: Denied Access Forbidden
I have the following problem and have not yet found a solution in any other post.
I am currently working in an SSH shell and should "move" one or more apps from another SSH shell. The apps ...
0
votes
0
answers
23
views
Passing variable from shell script to another script using expect
I'm trying to write a script to be able to pass a variable using script_a.sh which extract a value from the database to pass another script script_b.sh which uses this value as part of the input for ...
0
votes
1
answer
64
views
Running Custom C over ssh with paramiko [duplicate]
I've been trying to automatically execute some compiled C code over an SSH session. However, I have a big issue; my C code requires user input, and therefore I need to be able to catch those inputs ...
-3
votes
0
answers
75
views
One-liner to create and enter a temporary directory? [duplicate]
I am passing a small series of commands to a remote server through ssh. the basic format is:
sshpass -p $password ssh $username@$host -p $port $commands
the commands are passed in the form of a string,...
1
vote
1
answer
33
views
How do use netmiko to send a tab-complete command and read the output?
I'm new to netmiko (and network automation in general tbh), and I'm currently trying to use it to send a command that, when used manually, requires you to press tab a few times in order to get the ...
0
votes
0
answers
56
views
Can we use SFTP GET command to retrieve the latest file from the directory? [duplicate]
I looked for a solution to retrieve the latest file from the directory and found in google in this very website.
latest_remote_file = $(ssh username@server_name 'ls -tr /path | tail -n 1')
scp -r ...
0
votes
0
answers
23
views
Writing a bash script to wait for a process on a remote machine to finish [duplicate]
I'm writing a script to automate some tasks, one of the steps is to wait for a process started on a remote machine to finish execution.
My idea is to show a spinner while the process keeps executing, ...
0
votes
0
answers
71
views
Wait for command completion and capture output in interactive shell with Go crypto/ssh
After piping in a command to stdin after running session.RequestPty() and session.Shell(), there's seemingly no way to tell when that command is either done executing so I can try to parse stdout ...
0
votes
0
answers
38
views
Python - check for specific shell prompt on a remote server
Is there a way, using Python, to check for a specific command prompt on a remote Unix server. I need to be able to SSH to a series of remote Unix servers, check that I receive a "INPUT NAME:&...
0
votes
0
answers
45
views
Storing Results from SSH Shell in Flutter Application
currently developing a Flutter application that communicates with various network devices, including an OLT (Optical Line Terminal) VSOL device. Unlike other devices where I can directly fetch results ...
0
votes
1
answer
47
views
Bash ssh execute command occationally result in ^M
I was conducting an experiment using bash script, and need to execute some commands on the remote SSH side[Both local and remote machines are Linux-based ]
When I use the following command [use ...
0
votes
1
answer
98
views
How to run a trunk of commands thru' SSH with login shell and not to print out commands
I have Node.js installed by NVM on server and it doesn't work with SSH.
It shows node: command not found in non-login shell.
For example, this won't work
ssh server1 <<doc
node -v
doc
This ...
0
votes
0
answers
53
views
Bash script for executing linux commands on remote machines using ssh key [duplicate]
I want to run a script to get details of hardwares and user details from multiple remote machines by login using ssh private key. this is my script
#!/bin/bash
# Check if the user provided a file
if [...
0
votes
1
answer
28
views
Checking ssh and vnc connections using bash script
Hello im trying to check devices if they are accessible or not with the ssh and vnc. I need to use bash scripting. Can anyone help? Thanks...
I tried to do with </dev/udp/ but it says accessible ...