ssh-tunneling

How to tunnel to host using ssh config?

How to tunnel to host using ssh config? Command I’m using to tunnel: ssh -L port:url:port username@hostname Can I define this in my ssh config? something like this pseudo code: host web user url hostname externalPort destinationPort tunnel yes Asked By: Nickotine || Source Yes, that can be done. For exaple: Host web User user_on_web …

Total answers: 1

Configuring an AWS E2 proxy for SSH-tunnelling your web browser

Configuring an AWS E2 proxy for SSH-tunnelling your web browser A web browser usually connects to the Internet directly. Sometimes that’s undesirable. On such occasions, routing traffic via another system is preferable. VPNs achieve the desired result, but typically require monthly subscriptions. SSH-tunnels offer an alternative solution. Given AWS E2 can serve as a termination …

Total answers: 1

Create ssh config to VNC server with tunnel via intermediate machine

Create ssh config to VNC server with tunnel via intermediate machine I recently found out about ssh config file where one can setup frequently used ssh connections. However, I am having troubles transforming one command which connects my computer to VNCServer running on my server which is hidden behind intermediate server. Basically transform this command …

Total answers: 1

I have a raspberry pi can i use minecraft and tunneling with localhost.run

I have a raspberry pi can i use minecraft and tunneling with localhost.run Hey i have a raspberry pi with raspbian installed Im wonder if i could use localhost.run which is a website that allows tunneling with ssh could i use this with a mc server looking to run java edition if would it be …

Total answers: 1

Saving the dynamically allocated port of SSH tunnel

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 remote forward to 192.168.0.16:80 I am getting output about the allocated port, however, when …

Total answers: 1

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

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 computer on the LAN. Is there a command I can run on the …

Total answers: 1

forward remote tcp port to local port

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 Server’s port to My Pc and open a TCP Server to …

Total answers: 1

Can a SSH reverse tunnel accept non-local connections?

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 redirects port 2223 to homeserver port 22. I …

Total answers: 2

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

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 -N -L 8443:127.0.0.1:8443 user@server on …

Total answers: 1

Forward or mount a /dev/ttyUSB file via ssh?

Forward or mount a /dev/ttyUSB file via ssh? A USB device is connected to a server/machine (/dev/ttyUSB0) and I would like to access it as if the device file were located on my local machine. USB driver, udev etc.. on my local machine. Is there a way to forward or mount the file (as a …

Total answers: 1

Recording the dynamically allocated port number with SSH remote port forwarding

Recording the dynamically allocated port number with SSH remote port forwarding In the SSH documentation, for remote port forwarding, it says: If the port argument is ‘0’, the listen port will be dynamically allocated on the server and reported to the client at run time.  When used together with -O forward, the allocated port will be …

Total answers: 2

How to use ssh-copy-id with multiple-hop ssh tunnel?

How to use ssh-copy-id with multiple-hop ssh tunnel? I’d like to copy a public ssh key from the ~/.ssh/id_rsa.pub file on my local machine to the ~/.ssh/authorized_keys file on a remote host that is two ssh hops away. In other words, localhost only has ssh access to host1, but host1 has ssh access to host2. …

Total answers: 2

How safe is SSH when used for tunneling?

How safe is SSH when used for tunneling? Scenario: I want to connect from Client A to Client B using SSH/SFTP. I can not open ports on either client. To solve this issue, I got a cheap VPS to use as a relay server. On Client B I connect to the VPS with remote port …

Total answers: 2

SSH connect to a UNIX socket instead of hostname

SSH connect to a UNIX socket instead of hostname Short question: How do I connect to a local unix socket (~/test.sock) via ssh? This sockets forwards to an actual ssh server. The obvious does not work and I can’t find any documentation: public> ssh /home/username/test.sock “ssh: Could not resolve hostname: /home/username/test.sock: Name of service not …

Total answers: 3

SSH port forwarding via jump host, ssh_config files and ONLY "ssh targethost"

SSH port forwarding via jump host, ssh_config files and ONLY "ssh targethost" NB: The OpenSSH clients I am using are all at version 7.2, so no RemoteCommand available. Assume the following setting: machine foo is a jump host and provides access to host bar via its localhost:10022 bar sits inside a network inside of which …

Total answers: 1