Skip to content
Advertisement

Tag: ssh

Chain SSH script

Let’s say I have 3 linux servers. I need a script that will login from s1 to s2 via ssh, then from s2 to s3 via ssh, then check, if there is already exists string in ~/.ssh/authorized_keys from s1 then do nothing otherwise do s1 and s2 are constant, s3 can be variable. ssh from s1 to s2 already settled

Unable to connect to SSH on Google Cloud VM Instance

I have run into a problem today where I am unable to connect via SSH to my Google Cloud VM instance running debian-10-buster. SSH has been working until today when it suddenly lost connection while docker was running. I’ve tried rebooting the VM instance and resetting, but the problem still persists. This is the serial console output on GCE, but

How to SSH a curl command

env = GNU bash, version 4.2.46(2)-release (x86_64-redhat-linux-gnu) Situation: SystemA=No internet. SystemB=Yes internet. SystemA has a log file. SystemA wants SystemB to send a curl command for him. SystemA$ ssh SystemB curl -X POST -H “Content-type: application/json” -d “$data” $hook = fail SystemB$ curl -X POST -H “Content-type: application/json” -d “$data” $hook = success How do I achieve this without SystemA

SSH Key Exchange with alternate user

So I am using RHEL 7. I have two servers with the following user accounts root (obvious) admin I want the setup to work in the following manner. passwordless SSH from server 1 to server 2 using the admin user, but the SSH initiation is done from the root user always. We are not allowed to do ssh key exchange

How to run remote script on multiple host simultaneously

I have a great amount of Linux servers to maintain. Frequently I need to run a script (script.sh) on all of them to get the health status, this script usually takes about 30-40 seconds to give an output. To facilitate maintenance tasks, I’m writing a shell script that uses SSH to loop through all remote hosts, run script.sh, collect output

Advertisement