All Questions
503
questions
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 ...
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 ...
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 ...
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
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....
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
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 ...
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 ...
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 ...
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-...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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. ...
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 ...
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 ...
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, ...
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 ...
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. ...
5
votes
3
answers
9k
views
How do I properly SSH into a server behind a NAT while maintaining the tightest possible security?
I have a VPC in Amazon AWS. There's a NAT Server running in a Public Subnet that connects to an Internet Gateway. I have a bunch of servers running in various private subnets within the VPC. I'd like ...
5
votes
1
answer
8k
views
Create multi-hop SSH tunnel with different user on end machine
I have tried creating a multi-hop SSH tunnel using a command like this:
ssh -L 2222:username@host2:22 host1 -N
However, when I try to use the SSH tunnel like this
ssh -p 2222 localhost
I get this ...
5
votes
1
answer
7k
views
SSH connection continuously dropping
I have configured my SSH connection as follows: ~/.ssh/config on client side
ServerAliveInterval 1
ServerAliveCountMax 1200
and in /etc/ssh/sshd_config on server side:
ClientAliveInterval 5 ...
5
votes
1
answer
5k
views
SSH Server Not Responding To Connection Request
I'm attempting to set up an SSH server on my local machine using OpenSSH. When I try to SSH from a remote host into my local SSH server, the SSH server doesn't respond and the request times out. I'm ...
5
votes
0
answers
3k
views
SSH reverse proxy
I am setting up a Gitlab server (https://about.gitlab.com/) inside a virtual machine using KVM on a Ubuntu 14.04 host. My university charges us for every external IP address, so I cannot use bridged ...
4
votes
5
answers
29k
views
How to block IP in ssh
A very insistent individual is trying continuously to gain (unauthorized) access to my system for the last few days... There are a gazillion of entries, like in /var/log/auth.log:
Jun 21 03:55:15 ...
4
votes
2
answers
12k
views
How to force hostname to resolve to local address instead of public address?
I have a linux server on my home network which uses Dynamic DNS provided by noip.com, and a corresponding hostname "xxxx.hopto.org". From outside of my network, say, at a coffee shop, I can use this ...
4
votes
1
answer
2k
views
How to route traffic from ssh server to my local machine?
I am a student at a college. In my school, we have this strange rule that after 12 midnight, there is an internal LAN Ban. That means I am able to connect to the internet (external traffic) while ...
4
votes
1
answer
5k
views
Make a wireless hotspot in Linux and then ssh to it when connected
I want my raspberry device to make its own hotspot when it boots up (Internet not needed), and then ssh to it.
So the two questions I'm actually asking is...
How do I create a hotspot in Linux?
Once ...
4
votes
1
answer
722
views
How to create or convert private key in Unix/Linux in .ppk format which can be used in Windows PuTTY?
Is it possible to create or convert keys in Linux into .ppk format which can be used in PuTTY in Windows?
Without downloading any additional software like puttygen, possibly using standard tools like ...
4
votes
3
answers
6k
views
Is there a TeamViewer for the Linux console?
I have several Raspberry Pi's running DietPi (debian based) distributed in different locations. My clients are companies and everyone has a different network infrastructure.
I need to have access to ...
4
votes
1
answer
3k
views
Why does my Ubuntu IPv6 ssh server not work?
I am failing to set up my Ubuntu Server (16.04 LTS) with OpenSSH via IPv6. The server is running inside a VirtualBox Machine, which has its network interface set to "network bridge" (if that is the ...
4
votes
2
answers
256
views
Best way of reliably SSHing to a remote roaming linux host
I have a remote linux host that moves around the world on a boat. When the boat docks in a port the boat's network connects to (essentially) public wi-fi. I need to be able to administer the remote ...
4
votes
0
answers
1k
views
Can you connect two GNOME-boxes via ssh?
I’m trying to set up 2 node Hadoop cluster using two lap-tops with GNOME-boxes, both running Ubuntu 17.10. The both laptops are connectes to the same wifi but the GNOME-boxes alone are not connected ...
4
votes
0
answers
2k
views
Unable to ssh into my linux machine behind a router from outside the network
We are about to deploy some of the gateway devices (Raspberrypi) in the field. Although we are trying to make them so robust that we should not be required to remotely access them but as this is one ...
4
votes
2
answers
2k
views
Binding DPDK to a NIC without loosing connection
I want to bind DPDK to a NIC and I'm following this documentation here
If I only have one physical NIC, how do we ensure that we don't loose connection to the machine while running the dpdk_nic_bind ...
4
votes
0
answers
2k
views
ssh connection sporadically hangs
Whenever I ssh to elsewhere, the connection is fine for 1-10 minutes, then hangs: no error messages, just stops accepting input. I can exit (CR-~-.) but that's it. I can't find anything suspicious ...
3
votes
2
answers
24k
views
SSH Connection Limitations
I have a network of 100 machines, all with ubuntu Linux.
Is there a limit to the number of machines that can connect to one single machine (at the same time)?
For example, can I have 99 of my ...
3
votes
4
answers
384
views
If the admin doesn't set the ssh service port on default 22, how can I find the port that he set?
If the admin doesn't set the ssh service port on default 22, how can I find the port that he set? Trust me I don't plan to doing bad things. I am just curious!
update: The ssh service port is on 521. ...
3
votes
2
answers
2k
views
After assigning public IP address using DHCP, whatsmyip shows expected 193.x.x.x but ifconfig shows 169.254.x.x link-local address
The computer in question has a Linux SO and is connected to a local network that has DHCP service active. I configured a public ip address to be given to that computer by the DHCP and I can ssh into ...