Tag Info

Hot answers tagged

5

An especially good solution for scripting is to use "master" mode, with a socket for control commands: ssh -f -N -M -S <path-to-socket> -L <post>:<host>:<port> <server> To close it again: ssh -S <path-to-socket> -O exit <server> This avoids both grepping for process ids and any timing issues that might be ...


5

In a very weird case, I also experienced this error while trying to create a local tunnel. My command was something like this: ssh -L 1234:localhost:1234 user@remote The problem was, on the remote host, /etc/hosts had no entry for "localhost" so the ssh server didn't know how to setup the tunnel. A very unfriendly error message for this case; glad I ...


4

From your workstation set up tunneling via: ssh -L8080:192.168.1.20:80 server10 Where "server10" is the public name you use to reach 192.168.1.10. This will listen locally on port 8080 and forward any data to 192.168.1.20:80 from the target host. An alternative is using the -D option for ssh for setting up a socks proxy. This will allow you to reach ...


4

My solution was similar to @slm's but I used SOCKS instead because it is simpler and required no proxy installation on the server or client. Run all commands on the computer with restricted acccess. in yum.conf set the proxy as follows proxy=socks5h://localhost:1080 from a terminal type ssh -D 1080 YOUR_USER@YOUR_SERVER_WITH_FULL_WEB_ACCESS press ...


4

-f -N is what you are looking for: ssh -f -N -L MY_LOCAL_PORT:FOREIGN_ADDRESS:FOREIGN_PORT MYUSER@SSH_SERVER


4

Very high level overview: The -D option tells ssh to listen for connections on that port using the SOCKS protocol. You configure Firefox to connect to ssh and speak the SOCKS protocol. You type http://www.google.com into your browser. Firefox connects to that SOCKS port. SOCKS can do a bunch of things, but what we're interested in is this: Firefox asks the ...


3

When you visit a website (one that's not hindered by your corporate firewall) your browser sends a request to the server listed in the URL on port 80 (by default). For example, to visit this site our browsers communicate with port 80 of the server unix.stackexchange.com When you set your proxy settings you told your browser to send everything to localhost ...


3

Sounds like autossh (Automatically restart SSH sessions and tunnels) could be something for you: http://www.harding.motd.ca/autossh/ To keep tunnels alive, and to administrate them in general. Should be on most distros base repos, so just use one of the following: apt-get install autossh # deb pacman -S autossh # arch yum install autossh # rhel


3

With ssh -D 8080 yourserver you can start a SOCKS proxy to your home server. Configure your client to use localhost:8080 as SOCKS proxy.


2

Use the -g option with SSH and then configure firewall rules to only allow C to connect to the port. -g Allows remote hosts to connect to local forwarded ports. The command would then be: ssh -g -D 1235 a@A


2

I believe you're getting confused by how SSH performs the proxying of the X11 connection via the tunnel it's established on the remote server side with how magic cookies typically works. From the SSH man page: excerpt The DISPLAY value set by ssh will point to the server machine, but with a display number greater than zero. This is normal, and happens ...


2

You should be able to proxy YUM's traffic over the SSH connection like so: add to the /etc/yum.conf on the protected server: proxy=http://127.0.0.1:8080 from the server with normal inbound/outbound ssh access: $ ssh -R 8080:ssh.server:8080 user@protected.server On the server where you want to run YUM commands: $ yum update References Port Forward ...


2

You need a desktop manager like xdm, gdm or kdm, configure it for remote access via XDMCP. Once the desktop manager on the desktop PC is set up to accept remote connections you do Xorg :1 vt8 -query <put desktop PC address here> on your netbook. KDM setup Depending on your distribution and version, the name and location of the config files may ...


2

Cisco routers has Telnet open by default. You have to explicitly make the configuration for SSH (set a domain, generase RSA, enable SSH 2.0 etc). Read the Cisco's documentation about how to configure Cisco and SSH.


2

Quite an interesting problem you've got. The real solution would be to ask your sysadmin for help first. If that's not an option, the next best thing is to have pyCharm's libssh or whatever it uses (I did some googling and couldn't figure it out) parse your `~/.ssh/config'. If that's not possible, you might be able to run your own ssh daemon on the remote ...


2

That's about it, but you've inverted home and office. The point is that the office firewall rejects outgoing connections other than web traffic. But since HTTPS traffic and SSH traffic are both encrypted, it can't easily distinguish between them, so the firewall just blocks outgoing connections to ports other than 443 (the standard HTTPS port) and probably ...


2

This looks like the linux host is configured to be some sort of RDP gateway. The command will initiate a SSH session to itself (root@localhost), start a local listener on port 3300 (L 3300:) to forward all traffic to a Windows machine on port 3389 (remote_WIN_machine1:3389), typical for RDP. I suspect that the GatewayPorts directive is set to yes in ...


1

It's ssh client that's working on your side (local), not sshd. pgrep -l ssh should list pids and names. If no clue, try netstat -tnp|grep -F '127.0.0.1:8888'. Or run lsof -itcp@127.0.0.1:8888 and find the pid and kill. Or ssh into the remote machine, and press ~C and enter on it's own line. You'll get ssh> prompt, type -h for help. ~# lists forwarded ...


1

Does the command below work? % ssh -o ProxyCommand='ssh -p 2222 userS@SERVER /usr/bin/nc %h %p' userD@DESKTOP If so, you can bake the proxycommand into your ~/.ssh/config to make scp and sshfs calls easier.


1

Not exactly the answer you asked for, but you should be able to transfer files through an SSH connection: sending ssh user1@firewall "ssh user2@cluster \"cat > remote_file\" " < local_file fetching ssh user1@firewall "ssh user2@cluster \"cat remote_file\" " > local_file EDIT: There are also terminal based file transfer tools like ...


1

Instead of wondering how to cope with a complex chain of SSH forwardings, separate the problems. Configure your system to have transparent access to every host. This is done once and for all in your ~/.ssh/config file. To teach SSH to use a machine as a proxy to another machine, declare a ProxyCommand . Host priv-server User user ProxyCommand ssh -W ...


1

This would be simple if you try a native sshfs which is recently added. Install sudo apt-get install sshfs sshfs -ttA user@pub-server ssh user@priv-server This will do the magic. For more infor see here Linux Journal


1

Instead use a more low level form of copying files by catting them locally, and piping that into a remote cat > filename command on priv-server: $ cat file1.txt | ssh -A user@pub-server 'ssh user@priv-server "cat > file1.txt"' or with compression: $ gzip -c file1.txt | ssh -A user@pub-server 'ssh user@priv-server "gunzip -c > file1.txt"' ...


1

I am not entirely clear on what the post talks about but I have been using something similar to redirect the http traffic over ssh from a remote server which does not support X forwarding. I do it as follows: ssh -L23000:localhost:23000 user@remotehost [remotehost] $ python -m SimpleHTTPServer 23000 Open browser on localhost and point it to ...


1

Transparent Multi-hop SSH If i understand your question correctly you're looking for a solution to ssh transparently into your lab server through the machine that's visible from the outside (let's call it gate). As lbutlr mentioned first thing that comes to mind is to ssh into gate first and from there to ssh into your lab server. This works but it's not ...


1

Your question seems unclear to me, and I'm not sure why you want ssh-tunneling. How do you login to the visible machine? If that is ssh, then can't you simply ssh from that machine to the internal machines? For example, when I am away from home, I ssh to my home server, then from there I ssh to 10.0.0.125 which is my desktop machine inside my home LAN. ...


1

BindAddress is not the option you're after. From man ssh_config: BindAddress Use the specified address on the local machine as the source address of the connection. Only useful on systems with more than one address. The configuration file equivalent of -R is RemoteForward: RemoteForward Specifies that a TCP port on ...


1

I realized the solution was much simpler than I expected, simply create an SSH tunnel like so: ssh -f -p port username@ip -L 3306:ip:3306 -N Where port is the port of the web server, and ip is the IP address of it. I'm working on using AutoSSH to keep a persistent connection.


1

ssh -L 5902:localhost:5902 user@host Where first 5902 is local port of the client, localhost is the server and second 5902 is the servers port which is vnc port. Then users(clients) can use vns from their local 5902


1

I'm pretty sure that the 2 connections in TIME_WAIT are from the server end of the connection, and if the servers are running as root, that makes sense. Note that the -L option doesn't create the actual tunnel, just the tunnel functionality. The act of connecting to the input IP/Port is what causes SSH to actually create the tunnel to the destination ...



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