Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [ssh-tunnel]

An SSH tunnel leverages the SSH protocol to transport unencrypted data through an encrypted connection.

-2
votes
0answers
32 views

most restrictive sshd_config that allows it to act as a jump-server [on hold]

What, among these and possibly other configs, will allow sshd to act as a jump host, but not open itself too much to attack or mis-use. For example, i would like it to act as a jump host, but do not ...
1
vote
1answer
20 views

Allow SSH Reverse Tunneling (-R), but not Local Forwarding (-L)?

We have a customer with a remote server who wants to restrict times we can access the server (most customers we have on-demand access initiated locally). I'm setting up a script for them so they can ...
1
vote
0answers
62 views

ssh routing between multiple linux system containers transparently

I have system where I run multiple containers. Each container is a linux system with a specific purpose and every container has a ssh server enabled. I want to make an entity that manage new ssh ...
0
votes
1answer
24 views

How can I remotely connect via ssh and reuse this connection for other apps without asking for the original credentials?

There's a remote Ubuntu container that I can access via SSH using a one-time connection code (username-password). I'm using Windows, and don't have much rights on the container itself. So I'm trying ...
1
vote
1answer
24 views

SSH on remote machine under NAT and dynamic IP

I have different hosts that are connected over a cellular network (so NAT and dynamic IP). I have a central server that I want to use to use as gateway to access those machine SSH server for remote ...
0
votes
0answers
11 views

How to setup port-forwarding between docker cli and host machine? (Permission denied: publickey)

I'm inside a docker cli (via docker exec -it cli bash). And I need to host a simple development server (expressjs) in the container. For reasons of I dont want to get into, I cant create a dockerfile ...
1
vote
1answer
39 views

ssl connection to aws serverless aurora

This is actually a follow-up question of this. I have created an Aurora Serverless database on AWS, created a VPC with 2 subnets as required by Serverless aurora and a Cloud9 connected to the subnet ...
0
votes
1answer
22 views

SSH tunneling and running commands inside Docker image

I'm pretty new to Docker and have a docker image, I need to do following: perform SSH tunneling to three different addresses from inside the docker image that to the outside. Then, I need to run a ...
-2
votes
1answer
33 views

How to test ssh tunelling?

Let's say I create a reverse ssh tunnel, with the following command. ssh -R 8080:localhost:11111 user@remote I can test that the tunnel is open on the remote with nc command nc -v 127.0.0.1 8080 ...
0
votes
1answer
28 views

Proxy a remote server as localhost

There is a server running in a "remotehost:some_port". I can connect to it from my linux machine like telnet remotehost remoteport. I have an application in the linux machine that is configured to ...
0
votes
0answers
42 views

SSH proxy jump interactive

I have a system wherein I am using SSH proxy jump as a way to connect from machine A to machine X through some number of intermediary steps. The advantage to this is that I can have an SSHkey on ...
0
votes
1answer
28 views

SSH keys for utility services on remote production server

For convienience I'd like to have a private SSH key on my remote server. But doing that creates a vulnerability if the server were hacked. Same as if I'd hard coded a password, anyone who broke in ...
0
votes
1answer
49 views

autossh options to open a port through a jumpbox

I'm connecting to a DB in a private subnet through a bastion host: ssh -N -M -i ${PEM_FILE} -L 3306:${DB_HOST}:3306 ec2-user@${BASTION_PUBLIC_IP} But the connection drops very quickly. Is there a ...
0
votes
1answer
21 views

Working around firewall to install packages

Hi I've been using linux for couple years now but never really sent much time on sysadmin stuff so I sort of know pieces of the answer but I need someone help me fill in the gaps. I have an EC2 ...
0
votes
1answer
17 views

How can I determine which request is periodically timing out through my ssh tunnel?

I am using a ssh tunnel from OSX combined with the SwitchyOmega chrome plugin to browse via a ubuntu box like this: ssh -D 54321 1.2.3.4 This timeout only occurs after I've started chrome. but even ...
0
votes
0answers
36 views

SSH tunnel for serving web sites from localhost

This is more question... When I do like this... I am able to serve my site to external IP of my VPS... ssh -L 8080:localhost:80 username@server.com How secure and is it okay to serve websites ...
0
votes
1answer
101 views

Can you connect to a VPN through an SSH reverse tunnel?

Say I have two machines, both running Linux; Machine A is running a VPN server and is behind a NAT. Machine B is the VPN client. Machine A creates a reverse SSH tunnel from itself to Machine B, ...
1
vote
1answer
82 views

Why can't I connect to MariaDB with Navicat through SSH tunnel?

I've always used Navicat on windows to manage my MySQL/Percona instances. A few days ago I bought a new server and have installed MariaDB 10.3.9. I can connect to it fine when I'm in a putty session ...
0
votes
0answers
34 views

Redirect HTTPS traffic into proxy or SSH tunnel?

Situation: I have a Linux machine, an application that attempts to download data by hard-coded URL over HTTPS. Problem is: ip of data server is blacklisted upstream. However, I have a machine free ...
0
votes
0answers
15 views

How to setup an outgoing proxy-like mechanism with only `ssh -f`?

I usually encounter this situation: I have an HPC protected by some firewall. I can access its login node through VPN and ssh. The ssh is capable of X-forward and forward port tunneling but no ...
0
votes
1answer
110 views

How to use socket file to access server if SSH Agent forwarding is enabled

I have bastion host. I connect to the bastion host using username/password. And I have private key for destination Server. Flow: Local Machine -> Bastion -> Destination I know that It's ...
0
votes
1answer
68 views

Simulate network environment and forwarding packets?

My question might be a bit weird, but here's some background first: I've got a client with devices in their own network with different IPs (mostly 192.168.x.x). From the outside, I connect to one of ...
-1
votes
1answer
63 views

When someone gains remote access to a server are there other ways to execute system commands other than the bash shell?

I am hardening a server and attempting to build a restrictive layer to a potential hacker even with root access to the server to do harm. If a user gains root or user access to the shell via say ...
0
votes
0answers
42 views

How to expand the usable IP range OPENVPN

I'm trying to set up a server that has over 1000 usable IPs, so I could in theory assign a static ip to that many devices. I have been able to set up an OpenVPN server with a /24 (mask 255.255.255.0) ...
0
votes
0answers
15 views

How can you restrict a specific dockerized webapp to tunneled connections?

So I have a few Docker webapps running on one server (swarm mode but without replication), like webapp1.mydomain.tld, webapp2.mydomain.tld accessible to the world. And I want mydomain.tld/phpldapadmin/...
0
votes
1answer
156 views

Securely sharing SSH access in a team with SSH bastion

I need to share SSH access to a number of servers with my teammates and looking for a secure way to do it. I came up with a configuration involving a SSH bastion server, but not sure how (and if) it ...
0
votes
1answer
51 views

Rewrite / Redirect Host With SSH Config File?

My company has three separate jump hosts. Something like: jump1.example.com, jump2.example.com, and jump3.example.com All internal servers must be accessed through these jumphosts: local ---> ...
0
votes
0answers
69 views

High CPU blocking performance on SSH tunnel with PHP-FPM

I've a Debian 9 VPS set up with Apache and PHP-FPM. It connects to another VPS to access a common database server VPS via an SSH tunnel. Mostly this works fine. Running a test for broken links ...
0
votes
1answer
92 views

End-End Encryption on SSH passing though 'untrusted' jump servers

I need to SSH between 2 "clients", both behind CGNATs, by using a third party server as a jump. This use case has been covered on this site already but: How do I make it so the SSH traffic is not ...
0
votes
0answers
24 views

Remote Debugging Through port 22

my IDE is running on a windows box 192.168.1.1, by enable debugging I have to start the debug server and listen on port 9000 then I instruct the python application running on the remote Linux box 192....
0
votes
1answer
93 views

Forward forwarded port in Docker

I have some trouble forwarding ports that are LocalForward to the container via SSH Tunnel. The whole network looks like this: This is my Dockerfile for the GW Container: FROM ubuntu:latest RUN ...
1
vote
0answers
214 views

Match address rule in sshd_config, , difference between localhost, 127.0.0.1 and [::1]

I would like to understand why these three rules in sshd_config behave differently : Match host localhost PasswordAuthentication yes Match address 127.0.0.1 PasswordAuthentication yes Match ...
1
vote
2answers
27 views

How to find the port used by sshd for a port bind without sudo?

To remove a given port bind the pid can be found with sudo netstat -lnpt and then removed with kill pid. As the process name is known (sshd) the non sudoer user who started it may found the pid with : ...
0
votes
0answers
41 views

Use ssh to redirect ports for VPN to Windows VPN-Server

I have a Windows 2016 Server configured with SSTP VPN in my private network. There is a public IPV6 address and the IPV4 address is behind carrier grade nat. So there is no way to access my VPN server ...
0
votes
0answers
45 views

Hop SSH servers with same key and escalate to root then query mysql and export results

Ideally, I would like to use a some sort of GUI to perform MySQL queries and be able to export results to the host computer. I need my host to ssh into a jump server, then ssh to another server, ...
0
votes
1answer
147 views

SSH Tunnel connected but can't git clone

I believe this is a fairly simple one, but on the face of things I am sure its not "wrong". I am trying to ssh tunnel in from my linux machine into a OSx machine that has access to my VPN. Setting ...
2
votes
2answers
851 views

ssh port forwarding with firewall-cmd

I'm trying to do an ssh tunnel into a server behind NAT: ssh from laptop --> Host with port forwarding in firewall --> Get directly into guest (172.16.0.2, behind host NAT). Using iptables on Host - ...
0
votes
1answer
87 views

how to forbid connecting to localhost for ssh socks5 proxy

when I start ssh socks5 proxy like that ssh user@localhost -D 0.0.0.0:1080 it allows to anyone to connect to localhost like curl --socks5 server.com localhost:12345 which can be a security issue for ...
0
votes
2answers
581 views

Eroor: $ ssh: Could not resolve hostname [HOSTNAME]: Name or service not known

I am on windows 10 machine. I need to ssh to our Bastion and then do port forwarding to connect to AWS instance. I have a config file that I use to ssh. My config file is as following: Host [host] ...
2
votes
0answers
136 views

SSH known_hosts entry for port number and tunneling using @cert-authority

I've set up SSH certificate authority on my server, including a signed host key with the applicable principals. I've set up my local known_hosts file to recognize the certificate authority and when I ...
0
votes
1answer
23 views

Forward incoming ssh request to different ports

I need to forward incoming ssh requests, if possible like this: sshRequest arrives at server public Ip at port 21 (if possible it provides an extra field ID) sshRequest is forwarded to localhost or ...
-1
votes
1answer
56 views

Passwordless SSH Local Port forwarding [closed]

I have setup SSH Local Port forwarding successfully with the below command ssh rex@server-001 -L 0.0.0.0:4122:node-x3:22 Now I am trying to do a passwordless access . For that I am using below ...
0
votes
1answer
39 views

connect from the ssh server to the remote computer using a local ip address

I have a remote Linux computer connecting on a local ssh server, creating a reverse ssh tunnel on port 5051. On the ssh server itself I run the following two commands, in order to give the remote ...
1
vote
2answers
517 views

SSH Local Port forwarding working from localhost only

I can directly access Host A ( 10.100.64.112) from my HomePC but cannot directly access Host B (172.88.3.31) . To access Host B , I need to first ssh to Host A and then to Host B . To directly ...
1
vote
0answers
90 views

check_mk using ssh tunnels/ssh proxy

I'm trying to setup monitoring with check_mk and wanted to see if this is possible. My issue is as follows: Layout: Monitoring server: 1.1.1.1 Bastion server: 2.2.2.2 Host A: ...
2
votes
2answers
41 views

Does SSH tunneling require a separate SSH profile?

I'm still trying to understand how tunneling works, but I have some instances on AWS that I enabled SSH tunneling to view some web apps for monitoring applications running on the machine and I'd like ...
2
votes
1answer
487 views

SSH into remote host using jump box

I have a current setup for my servers like below: My computer ---> Jump box -----> Target server in private network I connect to the jump box from my computer using command ssh -A jumpbox ...
-2
votes
1answer
273 views

How to create local proxy server accessible to machines on LAN

My requirement is ... Route "all" the traffic from locally connected machine A to pass through machine B, as if the traffic originally got generated from machine B. Reason.. Machine B has access to ...
1
vote
1answer
95 views

Monitoring an SSH tunnel

I have a requirement to have a users home workstation (mac) connect via ssh tunnel to a corporate bastion host (bastion.corpnetexternal.com) and through to a mac workstation (host.corpnetinternal.com) ...
2
votes
1answer
274 views

Deploying application with SSH tunnel

I am developing spring-boot application where my backend-side is connecting to database using ssh tunneling (this part is required and cannot be changed). I have three ways to deploy application: ...