All Questions
501
questions
352
votes
19
answers
322k
views
How to reliably keep an SSH tunnel open?
I use an SSH tunnel from work to go around various idotic firewalls (it's ok with my boss :)). The problem is, after a while the ssh connection usually hangs, and the tunnel is broken.
If I could at ...
214
votes
7
answers
208k
views
scp between two remote hosts from my (third) pc
I have two remote hosts.
host1-> 10.3.0.1
host2-> 10.3.0.2
Both run an ssh server.
The ssh server listens on port 22 in host1 and on port 6969 in host2.
Now, using my local machine, I need to copy ...
35
votes
2
answers
146k
views
SSH: Troubleshooting "Remote port forwarding failed for listen port" errors
Question: Why does ssh -N -R 2222:localhost:22 <bluehost_user>@<bluehost_ip> result in a "Remote port forwarding failed for listen port" error? The objective is to establish a ...
29
votes
1
answer
13k
views
How to release ports on the SSH server when a reverse ssh tunnel disconnects abruptly/uncleanly?
We have a some hardware we install at our customers' locations, that hardware connects to our ssh server and establishes a reverse ssh tunnel so we can gain access to several client systems for ...
28
votes
5
answers
76k
views
How to (cleanly) dismount sshfs when mounted on a NFS mount point?
My coworker has a desktop computer with /home shared on our file server. I have developed a Perl script for sshfs-mounting a certain directory on another SSH host which works fine on my laptop.
On ...
24
votes
2
answers
34k
views
how to run a tunnel in the background as part of a shell script
I run these two commands all the time to connect to my rds instance on aws that's protected behind a firewall (so i tunnel through the ec2 instance) like so:
command 1: open the tunnel (run on ...
22
votes
3
answers
50k
views
How to connect to Windows subsystem for Linux from another machine within network?
I set up my Ubuntu WSL instance and am running an SSH server on it. However, when I do ifconfig on the Ubuntu console, my Ipv4 is 172.26.66.223, which is different from my regular machine's ipv4 192....
20
votes
2
answers
34k
views
Bluetoothctl connects and disconnects repeatedly
I am using a Raspberry Pi Zero with a Iot pHat and was able to ssh into the Pi using a USB cable using this tutorial. I then set up my home WiFi with the pHat. Then I powered up the Pi with a separate ...
17
votes
4
answers
48k
views
How to set up an alias server name
I want to set up an alias server name on my laptop (Linux). I do not want to use the /etc/hosts/ file since the IP address of the remote server changes. The reason I want to do this is because the ...
15
votes
2
answers
20k
views
Directly connect MacBook to Linux desktop via ethernet for fast SSH?
I am looking at building a Linux desktop—desktop only; no monitor support—and getting a MacBook Pro as my main computer for mobility. I would like—while I am at the office—to basically use my MacBook ...
15
votes
2
answers
16k
views
Why does rsync over SSH give me 10x the throughput of SCP?
scp user@aws-ec2:~/file file
rsync --partial --progress -Pav -e ssh user@aws-ec2:~/file file
scp only gives me 200K/s, but rsync gives me 1.9M/s
I tested several times, all same results.
rsync ...
14
votes
1
answer
1k
views
Are host configurations in the SSH config merged?
I have the following generic host configuration in my .ssh/ssh_config:
Host *
ConnectTimeout 5
ServerAliveInterval 5
ServerAliveCountMax 12
I also have some specific configurations. For ...
12
votes
3
answers
16k
views
ssh multi-hop... adapting command to ssh config file
I am trying to put my multi-hop ssh command into the ssh .ssh/config file.
This is my connection graph: laptop (i am here) ------> userver -------> workstation
I have put the ssh public rsa keys ...
12
votes
2
answers
6k
views
Laggy SSH sessions on local network
I have two machines:
Windows 7 connected by ethernet to a router
NixOS laptop, connected wirelessly to same router
My issue is that sshing from Windows to NixOS is extremely laggy. If I ping NixOS ...
11
votes
3
answers
15k
views
Not authorized to control networking in SSH console
I want to control Network manager from the command-line. This worked well enough in Ubuntu 10.04 (with cnetworkmanager, nmcli is another possible choice).
Since the upgrade to Ubuntu 10.10 however, a ...