Tag Info

Hot answers tagged

7

From the SSH Protocol documentation, regarding channels: All terminal sessions, forwarded connections, etc., are channels. Either side may open a channel. Multiple channels are multiplexed into a single connection. Channels are identified by numbers at each end. The number referring to a channel may be different on each side. Requests to ...


5

I have drawn some sketches The machine, where the ssh tunnel command is typed is called »your host«. Introduction local: -L Specifies that the given port on the local (client) host is to be forwarded to the given host and port on the remote side. ssh -L sourcePort:forwardToHost:onPort connectToHost means: connect with ssh to connectToHost, and ...


4

You haven't set up (or tried to use) a HTTP proxy, nor an ssh tunnel. Instead, you used port-forwarding over ssh. Forwarding TCP ports does not work for HTTP. Visiting a HTTP URL uses the domain of the URL at two different points. 1 - to find the IP address to send messages to. 2 - for the the Host header in the HTTP message. This lets one IP address ...


4

I have drawn some sketches The machine, where the ssh tunnel command is typed is called »your host«. Introduction local: -L Specifies that the given port on the local (client) host is to be forwarded to the given host and port on the remote side. ssh -L sourcePort:forwardToHost:onPort connectToHost means: connect with ssh to connectToHost, and ...


4

I think the feature you're looking for is called connection sharing. Add this to your $HOME/.ssh/config file: ControlMaster auto ControlPath /tmp/ssh_mux_%h_%p_%r excerpt #1 from SSH Can Do That? Productivity Tips for Working with Remote Servers Fortunately OpenSSH has a feature which makes it much snappier to get another terminal on a server you’re ...


4

Solution 1: From your PC on network A, create a reverse ssh tunnel with something like Putty by connecting to a Linux host on Network B. The local port should be 3389, the remote host 127.0.0.1 and the port is arbitrary (lets use 6000 as an example). Then from your PC on network B, use putty to connect to the same Linux host, and do a forward tunnel. Local ...


3

What you're looking for is called a reverse tunnel. ssh provides it through the -R switch: -R [bind_address:]port:host:hostport Specifies that the given port on the remote (server) host is to be forwarded to the given host and port on the local side. This works by allocating a socket to listen to port on the remote side, and ...


3

I have drawn some sketches The machine, where the ssh tunnel command is typed is called »your host«. Introduction local: -L Specifies that the given port on the local (client) host is to be forwarded to the given host and port on the remote side. ssh -L sourcePort:forwardToHost:onPort connectToHost means: connect with ssh to connectToHost, and ...


3

This error definitively pops up when you use ssh options ControlPath and ControlMaster for sharing one socket connection to be reused between several client connections (from one client to the same user@server). Opening too many (whatever it means, in my case ~20 connections) yields this message. Closing any previous connections lets me open newer, again up ...


3

I have drawn some sketches The machine, where the ssh tunnel command is typed (or in your case: Putty with tunneling is started) is called »your host«. Introduction local: -L Specifies that the given port on the local (client) host is to be forwarded to the given host and port on the remote side. ssh -L sourcePort:forwardToHost:onPort ...


3

What if you used a tool like autossh to maintain your ssh connections instead? I use autossh to maintain both an smtp (port 25) and imap (port 143) open on my laptop back through a server on the internet with multiple servers behind it that are accessing the internet via NAT. smtp (25) ...


3

As said in other posts, if you don't want a prompt on the remote host, you must use the -N option of SSH. But this just keeps SSH running without having a prompt, and the shell busy. You just need to put the SSH'ing as a background task with the & sign : ssh -N -L 8080:ww.xx.yy.zz:80 user@server & This will launch the ssh tunnelling in the ...


3

You can do this through ssh's ProxyCommand facility. Add the following to your $HOME/.ssh/config file. Create it if it doesn't exist with just this content: Host remoteserverX User userint ProxyCommand ssh userext@externalserver nc remoteserverX %p Host remoteserverY User userint ProxyCommand ssh userext@externalserver nc remoteserverY %p ...


2

ssh -L is what you're looking for. Lets draw a picture that has 4 total hosts, A, B, X, Y. A is the machine that has your regular client, lets say, web browswer B is your nearest local SSH capable machine, which might be the same as A. X is your remote SSH capable machine Y is the machine hosting the service (lets say, web server) you wish to access from ...


2

If the 'remote' cannot be resolved on the server you will get that error. Replace with an IP address and see if that resolves your issue... (Basically same answer as that of Neil - but I certainly found that to be the issue on my side) [I had an alias for the machine name in my ~/.ssh/config file - and the remote machine knew nothing of that alias...


2

Thanks to @Ignacio Vazquez-Abrams here are all the steps: Make sure netcat is installed on the Debian server, and use ProxyCommand in your local SSH configuration (~/.ssh/config). I edited config as follows: me@kubuntu_laptop:~/.ssh$ nano config The contents are: Host kubuntu_desktop ProxyCommand ssh debian_server_fqdn nc localhost 1234 User ...


2

Not the most elegant way, but here's how I would do it: Replace the port specifications in your original file with a unique pattern. For example: LocalForward myport localhost:myport Alias ssh from within your .bashrc: alias ssh='/path/to/ssh_wrapper.pl' Write the file /path/to/ssh_wrapper.pl: #!/usr/bin/perl use strict; use warnings; my $cmdline = ...


2

Using a master connection doesn't change the way you invoke ssh, except for the options related to connection sharing (-S, -M, -o ControlXXX). All a master connection changes is that when a master connection is already established, new slave connections go through that rather than authenticating again. This saves the need to provide a password or key, and ...


2

If tomcat is not listening on loopback (127.0.0.1) then a port forward to that will give the error message you've been receiving. If I do an ssh, with a port forward to a non-listening port (eg: ssh -L1234:127.0.0.1:9999 10.0.0.1 - where no process on 10.0.0.1 is bound to port 9999 on 127.0.0.1) , I get the same error: channel 2: open failed: ...


2

When you connect to a remove machine via ssh with X11 forwarding enabled, ssh on the server creates a .Xauthority file in the user's home directory. Because ssh listens for X11 on a TCP socket, anyone can connect. Because anyone can connect, we need some way of preventing just anyone from using your display. This is done with that .Xauthority file. The file ...


2

A possibility could be to download whatever you need from your client and then send those files by scp to your server if it accept scp. scp file_to_send user@server_ip:/location_of_the_file I don't know if what your asking is possible as your server has no acces to the client.


2

Using an Expect script to send a hard-coded plaintext password is generally a Very Bad Idea. If you needs scriptable, passwordless SSH connections, it's far better to use key-pair authentication: ssh-keygen # and then follow the prompts; don't set a passphrase ssh-copy-id username@remote.host.example.com After doing so, you can ssh ...


2

OpenSSH is secure enough to be accessible over the open Internet, if configured properly. So setting up a reverse tunnel that is publicly accessible is fine, if the forwarded port is secured properly. Some tips for securing OpenSSH: Protocol 2 PermitRootLogin no HostBasedAuthentication no PasswordAuthentication no UsePrivilegeSeparation yes ...


2

You have two options. Either use different source addresses or use a socks proxy. Different source addresses Your lo interface is configured as 127.0.0.1/8, i.e. all addresses starting with 127 do belong to the current host. The syntax for your tunnel is -L [bind_address:] port:host:hostport Therefore you can use something like: ssh -L ...


2

I often do the same thing with LocalForward directives. I also use connection muxing with ControlMaster, ControlPersist, and ControlPath directives; if I want to have a connection that I use just for the tunnels, since my connections' muxers persist for 30 minutes, I can ssh user@hostname.example.com logout and have 30 minutes to open any tunnelled ...


2

Assuming you have: A with ip address ip_A B with ip address ip_B C with ip address ip_C From a first terminal connect to the B and set a tunnel to C on ssh (port 10022 is used for the tunnel but it can be anything else): ssh ip_B -L10022:ip_C:22 Then from another terminal, you will be able to connect "directly" to C from A by using the tunnel you just ...


2

You can do that by using lsof to check which TCP ports are in state LISTEN and used by sshd: [jenny@willow ~]$ sudo lsof -iTCP -sTCP:LISTEN | grep sshd sshd 1084 root 3u IPv6 0xffffff0003fed888 0t0 TCP *:ssh (LISTEN) sshd 1084 root 4u IPv4 0xffffff0003fed5b0 0t0 TCP *:ssh (LISTEN) sshd 47607 jenny 7u IPv6 ...


2

SSH SOCKS5 Tunnelling using PuTTY: Firstly connect to your server via SSH using PuTTY. Right-click on the top bar and hit 'change settings'. Goto Connection/SSH/tunnels. Source port: 4567, select 'Dynamic' and hit 'Add' Open up your choice of browser, and configure the 'Manual Proxy settings' to listen on port 4567 on localhost (127.0.0.1). In Firefox ...


1

You need to specify the remote display that you want to forward. On remote: DISPLAY=:0 ssh -X -p 5555 user@localhost # not sure why you used 192.168.1.2 To forward the :0 display. Then in that shell (now running on your home machine), run: echo "$DISPLAY" to find out what is the forwarded display. That will be something like localhost:10, which means ...


1

This is what the man page is trying to say. I have the following setup. vncviewer .-,( ),-. __ _ .-( )-. gateway vncserver [__]|=| ---->( internet )-------> __________ ------> ____ __ /::/|_| '-( ).-' [_...__...°] | | |==| ...



Only top voted, non community-wiki answers of a minimum length are eligible