Skip to content

Tag: ssh

SSH Tunnel to a machine on another network [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack …

bash list postgresql databases over ssh connection

I am doing some work on a remote Postgresql database. When I log into the server this command works on bash: $ psql -c “l” Remote login over ssh is possible using: But why doesn’t it work from this command? This is working, also “psql -l” but I don’t understand why I have t…

Multi Hop, Self Closing, Background SSH Tunnel

I’m trying to create a multi hop ssh tunnel, that is in the background, and self closing. What I have is… This successfully creates a multi hop ssh tunnel that closes the port on host1 after I close the tunnel. However, if I try to fork it to the background, like this… It runs in the backgro…

No activity on server with logging every 5 seconds

Recently I have notices that log files on my server grow faster than I was expecting. After a quick look I have realized that it is wtmp what aggressively is taking my disk space. Using utmpdump command (see below) I found out that every 5 seconds new 3 or 4 logs are recorded. There is no load on the server:

How to setup a ssh connection to connect only via the localhost

We have a Linux Server with 2 users user1 and user2. We have to login from user1 to user2 via ssh such as: Both users are on the same server. However, user1 is an automated script where we cant type in manually the password and we dont want to store the password. Therefore, we want to use an ssh key

How to ssh.invoke_shell() work under Linux

The problem is that in theory the var channel_data must have and print This: Inted of that, it print this: The host “xxxx@yyyyy~$” it never appeared, so the part of the code when I asked for: It never happened. The only difference from this, to the paramiko librarie example I saw, was that the cod…

Bash poweroff script hangs system

My intention is to cycle through my list of ips and poweroff if my ping succeeds first. However the systems seems to hang. After running this script I can’t ping the systems anymore and they aren’t powered off. If I run ssh 192.168.1.ip “sudo poweroff” through terminal I dont encounter…