Questions tagged [ssh-tunneling]

An SSH tunnel provides an encrypted channel based on the SSH protocol.

Filter by
Sorted by
Tagged with
0 votes
0 answers
25 views

How to forward SSH tunnel to a CIDR range or several local IPs on the local host

I would like to open an SSH tunnel as follows: ssh -f -N -L 172.16.0.0/12:5433:127.0.0.1:5432 server but this raises an error: channel_setup_fwd_listener_tcpip: getaddrinfo(172.16.0.0/12): Name or ...
  • 275
0 votes
0 answers
11 views

SSH with port forwarding: session end problems

I have successfully setup up port forwarding using -L. Let's assume I did -L 8088:192.168.0.10:8088 If I exit the session immediately everything is OK. If I curl this port everything is OK. If I use a ...
  • 225
0 votes
0 answers
11 views

Forward webpage from local network of remote device through reverse SSH tunnel

I have an IPTV camera in a remote network. It has an HTML page for changing it's parameters. In this network I also have a linux server (Ubuntu 22.04) with already confugured autossh to my VDS (so I ...
  • 1
1 vote
1 answer
60 views

Saving the dynamically allocated port of SSH tunnel

There is already a great question and answer here, but I have a different case. I create a tunnel with the following command: $ ssh -N -R 0:192.168.0.16:80 root@164.92.194.26 Allocated port 35007 for ...
0 votes
1 answer
39 views

Why still need local port forwarding for SSH tunneling

IIUC, dynamic port forwarding supports all the use case of local port forwarding, I am curious whether there are still some use cases of it that dynamic port forwarding cannot do?
1 vote
0 answers
76 views

How do you ssh using zstd dynamic compression?

I want to set up my ssh tunnel to do dynamic compression so that I get maximum throughput for the bandwidth and CPU resources I have available on each end. Since gzip compression is built-in and not ...
1 vote
1 answer
166 views

Tunnel 2 server

I am looking for a solution to tunnel two servers to each other. That is, in such a way that all data is sent from the source server to the destination server in an encrypted form and cannot be ...
  • 11
0 votes
1 answer
51 views

Run command by ssh and 1 jump in the middle

I am currently running the following command from a sh file, which checks if a file exists and reads the response: sshpass -p "$PASS" ssh -t $USER@$IP 'echo '$PASS' | sudo -S [ -d /myFile ]' ...
  • 1
0 votes
0 answers
115 views

How is it possible that the remote VSCode terminal can start a server instance on my local machine?

I have code for a Flask server on a remote server that I connect to with VSCode's remote development functionality, which (as far as I understand it) runs a VSCode server on my server and connects to ...
  • 101
0 votes
1 answer
49 views

How do I expose a port that an app is only allowing local connections to?

An app on linux-based "headless-box-1" is listening for HTTP connections on http://127.0.0.1:7860. Which restricts connections to self. But I wish it was listening for connections from any ...
0 votes
1 answer
55 views

How does local SSH tunnel (-L) work with no remote command (-N)?

I am new to SSH tunneling and I am trying to understand how -L works in conjunction with -N. First, let me confirm my understanding of local SSH tunnel by itself: ssh -L 10000:theprotectedserver.com:...
0 votes
1 answer
315 views

Enhancing Performance of X11 Forwarding [duplicate]

I'm succeeding in running remote applications in local windows when the remote server is on the same LAN as the ssh client. However, when I attempt to accomplished this on remote servers that are ...
  • 4,623
0 votes
0 answers
28 views

How to tunnel regular internet traffic, and SSH/Remote desktop through different connections?

-----Basic question:---------- I'd like all incoming/outgoing HTTP/S, internet traffic to go thru 192.168.2.1, and remote desktop or extrenal SSH connections to go thru 192.168.3.1. Not sure which ...
  • 1
1 vote
0 answers
148 views

How to bind SSH SOCKS5 proxy endpoint to a specific interface?

I'd like to use SSH on my Windows box to setup a SOCKS5 proxy to my multi-interface pfSense box and want the proxied traffic to be routed over a specific interface on the pfSense box. The -b option ...
  • 113
1 vote
1 answer
72 views

forward remote tcp port to local port

I have the following setup: The unit constantly tries to connect to the Remote Server on a specific known port. On the Remote Server, there is nothing but open TCP ports. I want to forward the Remote ...
0 votes
0 answers
337 views

Tunnel All trafic between To Linux Server

I have 2 Linux server Centos : server-1 : 192.168.10.1 / server-2 : 192.168.20.1 i can only vpn to server-1 but i want All trafic send to server-2 and have ip server-2 with connect to server-1 my ...
0 votes
2 answers
56 views

Can a SSH reverse tunnel accept non-local connections?

I have a server in my office behind a firewall, a home server behind NAT, and a laptop I carry around. Sometimes I want to reach the office server from home so I did the following setup. Home router ...
0 votes
0 answers
15 views

Treatment of parameters %h:%p for switch -W in multi hop jumps in ssh

With ssh -oProxyCommand="ssh -W %h:%p -oProxyCommand=\"ssh -W %%h:%%p -oProxyCommand=\\\"ssh -W %%h:%%p root@jmp1\\\" root@jmp2 \" root@jmp3" root@jmp4 you can do a ...
0 votes
0 answers
30 views

Rsync through reverse ssh tunnel

I currently have a working reverse ssh tunnel setup which allows me to remote into a cell network module-connected raspberry pi from a wifi-connected home desktop using port forwarding. While I can ...
0 votes
0 answers
28 views

Securely Forward Service on Private Network to Client on Another Private Network

I have two computers on private networks and a VPS, all running Linux. I would like to be able to make a secure tunnel between the two computers so that one can securely access services hosted by the ...
0 votes
0 answers
160 views

SSH reverse-proxy/redirection

I am looking for a solution to my use case: I moved my SSH daemon to non-default port and would like to keep all the script kiddies connecting to my SSH via port 22 in the ssh pit (purely just for ...
  • 1
0 votes
0 answers
31 views

Forwarding traffic via ssh from printer to raspberry pi

At my place of work, we have two different kinds of printers: Konica and HP. They are connected to our network and each have a specific ip. Each employee has an account they must access before ...
0 votes
0 answers
87 views

SSH tunnel to access the internet include DNS

My setup is as follow: The IT blocked access to use anydesk. I have a linux machine (at home) that I access it over the internet. The linux machine IP == 192.168.1.10 My router default gateway is == ...
0 votes
0 answers
29 views

compress tar from ubunut to a windows system via ssh

I have a windows system that i want to use for a backup of a local ubuntu server. I want to compress a folder and save it on the windows system. I have installed openssh on the window system and I ...
0 votes
0 answers
56 views

Rsync remote-to-remote with custom keys

I was previously able to rsync "remote-to-remote" by using this kind of script (ssh-agent forwarding + reverse tunnel): SOURCE_USER=user1 SOURCE_HOST=hostname1 SOURCE_PATH=path1 TARGET_USER=...
  • 113
0 votes
1 answer
235 views

reverse ssh tunneling: is there a 3rd machine between local and remote machines?

I'm facing for first time the need to connect my local pc (call it 'home') to my work pc (call it 'work') . Work pc CANNOT accept ssh connection because it's beside a firewall I cannot control. I read ...
  • 597
2 votes
0 answers
148 views

Give server access to DNS via SSH tunnel

This is a development on this question. I have managed to proxy HTTP and HTTPS requests as instructed above, but local name resolution fails. For example, nslookup would not be able to resolve a ...
0 votes
0 answers
15 views

device is connected via ipsec, this device is not able to connect to local network

A device is connected via Mobile network over a ipsec connection but is not able to connect to devices in the local network. It is possible to connect to the device via ssh from the local network. Is ...
0 votes
1 answer
63 views

ssh/scp config file with proxycommand still asks for password

My setup is like this: [local machine] --> [university network] --> [local machine in university network] [machine1] --> [machine2] --> [machine3] I have ...
-1 votes
1 answer
289 views

SSH Tunneling on webServer, localhost:80 -> localhost:81, but I received Permission denied (publickey)

I try to make a SSH Tunneling, localhost:80 -> localhost:81 I generate my keys localy and add the .pub on authorized_keys in the cloud. But I received, Permission denied (publickey). Ok, not the ...
0 votes
1 answer
302 views

VNC (tigervnc) via 'actual' ssh tunnel

I understand that vnc which is not encrypted or secure usually is used via an ssh tunnel. I currently have the native Ubuntu 20.04 VNC server (vino-server) working via an ssh tunnel. The ssh tunnel is ...
0 votes
1 answer
28 views

Run application if and only if SSH Tunneling is active on port X

I am running a code-server on my remote Ubuntu machine and right now my method for starting it up is to ssh -t -t user@server "code-server" on one terminal (the -t -t I got from this) ssh -...
0 votes
1 answer
301 views

ssh forwarding via jump server

Full disclaimer: I come from the data world and I have limited experience with Unix and Network. I have Mysql running on Linux 5.15.36 (say server A), and I have configured a jump server running ...
0 votes
1 answer
690 views

How to create a VPN tunnel to ssh into one server from another server via a local VPN/proxy?

I have a problem that for 4 days no one has been able to solve. The problem might be on the datacenter side. The problem is that one server can't talk to the other server. I even got technical support ...
0 votes
1 answer
256 views

Double tunnel hop via SSH

I'm using WinSSHTerm to connect to a proxy, from which I then connect to a server hosting a data warehouse. I just can't figure out how to reproduce my Putty connection using a shell command. Short ...
  • 113
2 votes
0 answers
199 views

Access Apache NiFi running on remote VM via browser and PuTTY

I'm trying to access a Virtual Machine running in Google Cloud which has a Apache NiFi service running on port 8080 on the VM. I have managed to create an ssh key and upload the public SSH key to the ...
0 votes
0 answers
561 views

Permanent SSH tunnel through bastion host

I have the following command that I run locally on my mac to be able to access a DB server trough a bastion host: ssh -L 9234:MYSERVERIP:5432 USER@MYBASTIONIP -i MyBastionPemKey.pem that works just ...
  • 101
0 votes
1 answer
55 views

ssh reverse mysql tunnel with a aliased host

I am trying to ssh into my server and then access the mysql on localhost for quick prototype development when testing on live. Here is my connection in the server: mysql -h db_master_www -u game -D ...
0 votes
0 answers
198 views

Help to configure SSH tunnel to access to a remote server

Here my scenario: 192.168.2.222 --- VPN ---> 192.168.2.200 / 192.168.0.10 --- LAN ---> 192.168.0.50 My local machine My remote machine Target server Due to the ...
  • 637
0 votes
1 answer
460 views

Access internet on linux machine using ssh connection with windows machine

Given a windows machine A and an linux machine B, I tried to implement this solution (also reading on this website) to access internet on B via A (machine A has internet access). On the windows ...
0 votes
2 answers
882 views

SSH Forwarding between client and two servers

I'm trying to figure out how to set up a shh tunnel between client and two servers. I need client to connect to ServerB via ServerA. These are the facts: Client can connect to ServerA (via public IP)....
0 votes
0 answers
186 views

Create SSH tunneling with multiple hosts

I want to create an SSH tunneling from: 192.168.6.66 -> 172.17.6.2 -> 172.11.3.3 -> 192.168.1.23 -> 192.168.6.71 What I'm trying is: On 192.168.1.23 to access to the last hop 192.168.6.71:...
  • 3
0 votes
1 answer
559 views

Hardening reverse SSH tunnel (via jump host)

When inspecting the system logs of some other issue, I noticed that I was getting lots of SSH attempts in real time. Specifically I have about 10'000 attempts daily! $ grep Disconnected /var/log/auth....
  • 1,040
0 votes
1 answer
41 views

restricted ssh tunnel through external facing server to mysql on internal server

Using my user I'm able to set up an ssh tunnel to mysql (port 3306) on an internal server by tunneling through an external server using: ssh -L 33306:localhost:33306 me@external.com ssh -L 33306:...
0 votes
0 answers
133 views

Reverse SSH Tunneling via middleman

I have two machines, both in a VPN network, let's call them A and B and there is a user John on his own machine C. A is not discoverable by John but B is. Let's make a user on machine A, 'rose'. What ...
  • 1
0 votes
1 answer
360 views

What is the default bind address used when opening an SSH tunnel without explicitly specifying it

When opening an SSH tunnel, e.g. as follows on Ubuntu 21.10: $ ssh -f -N -L 1234:127.0.0.1:5678 user@server what is(are) the default bind address(es) used under the hood (if any)? Is this equivalent ...
  • 275
0 votes
2 answers
398 views

SSH: ProxyJump from user without shell

I have a system user syncoid as $ cat /etc/passwd syncoid:x:993:990::/var/lib/syncoid:/run/current-system/sw/bin/nologin with the following ssh config: $ cat /var/lib/syncoid/.ssh/config Host eve ...
0 votes
1 answer
1k views

Using ssh+socat for remote port forwarding without ssh -R tunnel

I know that I can use ssh's remote port tunneling to create a connection between remote and localhost like such, ssh -fN user@remote -R remote_port:localhost:local_port I would like to do the above ...
0 votes
0 answers
55 views

Question about hosting behind router

I feel like a noob because I can't figure this one out. I have a linux machine (a raspberry pi running raspbian) behind a router, and I'm trying to host a website on it (port forwarding is not an ...
1 vote
1 answer
460 views

How to forward all port from Debian to Windows with OpenVPN

My Setup: Debian 10 from Azure Windows 10 from Azure Debian 10 is a clean new server from Azure with only OpenVPN installed and set up using the script from this Repository. Windows 10 is full of ...

1
2 3 4 5
14