Skip to main content

All Questions

Tagged with
352 votes
19 answers
323k 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 ...
Peltier's user avatar
  • 6,334
214 votes
7 answers
209k 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 ...
uwais ibrahim's user avatar
35 votes
2 answers
147k 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 ...
ngm_code's user avatar
  • 459
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 ...
TCZ's user avatar
  • 453
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 ...
Daniel Böhmer's user avatar
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 ...
abbood's user avatar
  • 1,284
22 votes
3 answers
51k 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....
Victor2748's user avatar
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 ...
Jacolack's user avatar
  • 303
17 votes
4 answers
49k 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 ...
Jess's user avatar
  • 975
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 ...
drjrm3's user avatar
  • 1,506
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 ...
Sato's user avatar
  • 395
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 ...
Pritzl's user avatar
  • 285
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 ...
labotsirc's user avatar
  • 248
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 ...
statusfailed's user avatar
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 ...
epsicot's user avatar
  • 321
10 votes
5 answers
225k views

SSH :connect to host localhost port 22: Connection refused

In debian kali I tried to connect ssh and getting the following error : SSH: connect to host localhost port 22: Connection refused Background : I was trying to connect ssh in debian, I am using ...
BlueBerry - Vignesh4303's user avatar
10 votes
3 answers
2k views

Attach to the same tmux session from different nodes of a cluster

I'm working on a computing cluster which has several hundreds of nodes. A load-balancing scheme picks an idle node to login to when ssh-ing into the cluster. As a result, it is very unlikely to re-...
elemakil's user avatar
  • 301
9 votes
2 answers
6k views

Hyper-V guest hostname doesn't resolve in local network

My Hyper-V host is Windows 10 Enterprise x64. I only have one guest running: archlinux. The guest is connected to all NICs: WiFi Ethernet (physical) Occasionally, I will SSH into the guest from ...
user avatar
9 votes
1 answer
13k views

Why would anyone install openssh-client instead of openssh-server? [closed]

I installed openssh-server on two pc's. I can connect from both from the one to the other. So if openssh-server sends as well as receives ssh, why would you install the openssh-client, just to make ...
Bentley4's user avatar
  • 1,948
9 votes
1 answer
15k views

Troubleshooting "Connection closed by authenticating user andy 173.63.60.32 port 11706 [preauth]"

As noted in the title, I am having trouble connecting to a remote server through ssh. I am trying to connect a Windows machine to a server running CentOS. I have been using PuTTY on the Windows ...
Phoenix's user avatar
  • 191
8 votes
1 answer
20k views

Can ping but can't connect (curl, wget, apt-get, etc.) (rasberry pi server)

Background: I am trying to set up a rasberry pi server. Everything was going well and my pi could apt-get update etc, until I got the port forwarding to work and ssh to work outside of the LAN. I ...
chase's user avatar
  • 193
7 votes
3 answers
8k views

how to solve: ssh "Connection corrupted" error

On a Oracle/RedHat VM that I use every days (probably after the nightly upgrades) I've this authentication error: $ ssh machine Bad packet length NNNNNNN. ssh_dispatch_run_fatal: Connection to A.B.C.D ...
Ivan Buttinoni's user avatar
7 votes
4 answers
24k views

SSH gateway server

Is there anyway to set up a ssh gateway server? What I am trying to setup is a way to connect to a specific linux shell on a Lan remotely from the internet without using port numbers. So for example ...
Lightning77's user avatar
7 votes
2 answers
3k views

Why ssh -R allows port '0' but ssh -L needs a port number?

Why with ssh -R is possible to allocate a free port by specifying '0' while with ssh -L you need to specify a valid free port? I want ssh to use a local free port to FWD remote traffic without ...
Leo Gallucci's user avatar
6 votes
2 answers
16k views

Use ProxyCommand for all SSH Connections

I was playing around with the idea of having a SSH Proxy Server or otherwise called Jump Host, which I would use to connect to all of my "hidden" Servers. So basically I have the following setup. ...
latz's user avatar
  • 163
6 votes
6 answers
105k views

SSH error ssh_exchange_identification: read: Connection reset by peer

I am trying to access ssh to a server but got "ssh_exchange_identification: read: Connection reset by peer". The same client works well when I move the computer to home but show the error when the ...
Tmx's user avatar
  • 289
6 votes
2 answers
2k views

Forward DNS request to my work's jump server

I have SSH access to a jump box on my work. This jump box gives access to the complete network infrastructure at work. This is great to work from home. I am able to run a SOCKS5 proxy on the jump box ...
Pritzl's user avatar
  • 285
6 votes
1 answer
14k views

Remote desktop connection to linux computer

I am frequently using ssh to connect to remote linux machines. Using ssh -X it is even possible to use the gui. Unfortunately, this is very slow, when done over the internet. The gui is very sluggish, ...
Alexander Cska's user avatar
5 votes
1 answer
24k views

Send Telnet command inside a SSH Tunnel

I want to connect my personal computer to some routers via Telnet, for managing them. Actually, my routers is in another network. I open the console, make a SSH connection to the Main Mahcine, and ...
Alex Deiwor's user avatar
5 votes
3 answers
7k views

Set up direct SSH connection from A to C without public IPs using one public SSH server

I have available these SSH servers/clients: A - without public IP B - public IP C - without public IP I know, I can establish an SSH connection from A to C as follows: 1) Hook C to B. ...
jirislav's user avatar
  • 573

15 30 50 per page
1
2 3 4 5
17