Tag Info

Hot answers tagged

17

if you only want to list tunnels created by ssh: % sudo lsof -i -n | egrep '\<ssh\>' ssh 19749 user 3u IPv4 148088244 TCP x.x.x.x:39689->y.y.y.y:22 (ESTABLISHED) ssh 19749 user 4u IPv6 148088282 TCP [::1]:9090 (LISTEN) ssh 19749 user 5u IPv4 148088283 TCP 127.0.0.1:9090 (LISTEN) (that would be a -L 9090:localhost:80 tunnel) if ...


15

If you check the man page for ssh, you'll find that the syntax for -R reads: -R [bind_address:]port:host:hostport When bind_address is omitted (as in your example), the port is bound on the loopback interface only. In order to make it bind to all interfaces, use ssh -R \*:8080:localhost:80 -N root@website.com or ssh -R 0.0.0.0:8080:localhost:80 -N ...


14

I'd just like to quote a little from Wikipedia here: Even if a symmetric cipher is currently unbreakable by exploiting structural weaknesses in its algorithm, it is possible to run through the entire space of keys in what is known as a brute force attack. Since longer symmetric keys require exponentially more work to brute force search, a sufficiently ...


10

youatwork@officepc$ autossh -R 12345:localhost:22 notroot@serverpc Later: you@homepc$ autossh -L 23456:localhost:12345 notroot@serverpc you@homepc$ ssh youatwork@localhost -p 23456 What you could do is this: in step 1 forward a remote port from the office PC to the server (12345 is used as an example, any port >1024 should do). Now connecting to 12345 ...


9

ssh -L opens a local port. Everything that you send to that port is put through the ssh connection and leaves through the server. If you do, e.g., ssh -L 4444:google.com:80, if you open http://localhost:4444 on your browser, you'll actually see google's page. ssh -D opens a local port, but it doesn't have a specific endpoint like with -L. Instead, it ...


9

If it wasn't created with multiplex enabled, you cannot. Next time, start the background session like this: ssh -f -N -M -S ~/.ssh/S.user@host.com -D 9000 user@host.com Here -M enables multiplex master mode, and -S sets the socket path. Now you can use ssh -S ~/.ssh/S.user@host.com dummyhost to open a second session over the same connection. It's ...


8

Three slightly different methods. (Replace $PORTX and $PORTY with port numbers of your choice.) First method: ProxyCommand machine-a$ ssh -f -N -D $PORT -oProxyCommand="ssh -W %h:%p machine-b" machine-c Second method: Connect from A to B, with "local forwarding" of $PORT to localhost:$PORT. machine-a$ ssh -L $PORT:localhost:$PORT machine-b Connect ...


7

The problem I see is that you are not going to be able to install anything like VPN software on these Internet Cafe computers, and even if you did, they could have keyloggers installed, leaving you very exposed. Frankly, I would in no way access my bank from any of them, and I would abandon your current plans. As a note: At least with TeamViewer, you ...


6

He will just see an SSH connection being open and perhaps some encrypted information when he does a closer data inspection. Unless he knows the encryption keys he won't be able to see what you're doing exactly. So from the network traffic, he will not be able to see if you've been on Facebook. Don't forget about browser history though. Your sysadmin might ...


6

If you can do it, the best way is to install screen on the remote server, and run your long processes within screen. If your ssh session drops out for any reason (including timeout or simply a lost connection) the processes you are running will continue, and you can reconnect to them once you re-establish connection. If this is not an option, then create ...


6

METHOD 1 (use ssh-key on inter) If you want to retain the authentication flow local -- authenticate --> inter -- authenticate (ask password) --> final This cannot be done with .ssh/config proxyhost. What you need is bash shell alias (I hope you are using bash). In ~/.bashrc, add following line alias ssh-final='ssh -t inter ssh user2@final.com' ...


5

You cannot reconnect to a session you already lost. You can only kill its processes. But if you are preparing for future, you can use tmux or screen for terminal-based programs and xpra (this fork) for X11 ones. tmux tmux ls tmux attach xpra start :100 && export DISPLAY=:100 xpra attach :100


5

What's wrong with using Remote Desktop? What else are you trying to achieve? You say you're coming from a Windows 7 client into a Windows 2008 server and Remote Desktop is available. I don't understand the problem. Remote Desktop Server can be configured to let you choose from different internal servers from your client at home, with the proper voodoo. ...


5

The SSH server on server.com is configured to refuse all TCP forwarding attempts through it; using -L will not work. An alternative to SFTP and SCP is good old tar: ssh server.com "ssh cluster.com \"cd mydir && tar cz myfile\"" | tar xvz Or cat: ssh server.com "ssh cluster.com \"cat mydir/myfile\"" | pv > myfile The "| pv" part is ...


5

When you ssh into the box, you are making a connection between your computer and the server; it's like you are sitting in front of the server looking at a terminal. When you run wget, the server uses its internet connection to download the file, not your home internet connection. Hopefully this graphic will help: A SSH connection: home ===> through your ISP ...


5

The initial key exchange is structured in such a way that it is not be possible for your ISP to determine the key, even if they have intercepted the entire key exchange process. This is possible because of asymmetric public-key cryptography. In assymetric cryptography, data is encrypted and decrypted using different keys (unlike symmetric cryptography, ...


4

Try Bitvise Tunnelier - it works for me. I set it to establish SSH tunnels while only being visible as a tray icon. It establishes the SSH connection on startup and re-establishes it as soon as connectivity is restored after a cut or after the system went to sleep. I still prefer the looks of the Putty console, so I keep using it - but for keeping tunnels up ...


4

I'm using bold to differentiate between the local port your connecting to on your ipad (in bold) and the remote port your accessing on your mediacenter (not bold). It looks like this is what you have been doing: ssh -L 8080:localhost:8080 username@YourMediaCenterPublicAddress.com The "-L 8080:" means that your going to be taking a remote resource and ...


4

By default, ssh doesn't allocate a pty when a command is given. For interactive use, you can override this by using the -t option. For authentication, if you are using public keys and a properly configured ssh-agent, you can use the -A option to enable agent forwarding. ssh -t -A user@ic ssh root@fw (What's it with using root everywhere? Don't be lazy, ...


4

While "events generated at timed intervals" is a planned feature in Upstart, it is not ready to provide that yet. So you should write a simple script like this: #!/bin/sh service sshproxy restart And put it into /etc/cron.hourly folder. Don't forget to set an executable bit (chmod +x /etc/cron.hourly/whatever.sh), or it will not start.


4

Depends on which setup you want: SETUP 1) server is listening ssh tunel LAN destination SERVER (listen on port 6000) ==========> LAPTOP -----> ip:port (LAN destination could also be localhost:port to connect laptop itself) PUTTY SETUP: right click on putty window title, choose Change settings / Tunnels ...


4

Your two problems (not being connectable and not finding DHT nodes) are related, but they have different causes and different (partial) solutions. Connectivity To be able to accept incoming connections, you have to accomplish three things: Forward the remote port uTorrent listens to to your client machine. In Preferences → Connection → ...


4

Download putty if you don't already have it, the format you need for this is: putty -ssh username@publicip -pw password -L localport:privateip:destinationport Here is what you would use to get to 192.168.1.1 remotely through SSH: putty -ssh username@publicip -pw password -L 8080:192.168.1.1:80 You could then open up a web browser to 127.0.0.1:8080 on ...


4

With -D & -L you have a way to communicate either way between the two machines. So... From the local machine, use -R to create a listenning port on the remote machine pointed at the local machine's sshd. Use -D on the remote machine, pointed at the port you created above. I "think" filling in the below will make it work... ssh remotehost -R ...


4

Just pull the dump with one command: ssh user@host 'mysqldump -u -p databasename' > /path/to/local/file.sql You can also compress these as well if your database is big: ssh user@host 'mysqldump -u -p databasename | gzip' > /path/to/local/file.sql.gz and then gunzip it after.


4

This is actually pretty easy to accomplish, even though it's somewhat buried in the ssh documentation. Assuming OpenSSH, the basic syntax is as follows: ssh -R 8080:localhost:80 -N username@your-server.dyndns.org This will open a listening socket on port 8080 of your-server.dyndns.org, and any connections that are made onto your-server.dyndns.org:8080 ...


4

This is the correct behavior. SSH establishes a tunnel and opens an interactive session. If you want the tunnel only, use the -N option of ssh; you might also be interested in combining that with -f: ssh -Nf -D 8080 -p 2222 remoteuser@remotehost.com From man ssh -f Requests ssh to go to background just before command execution. This is useful if ...


4

Edit: -g works for local forwarded ports, but what you want is a reverse/remote forwarded port, which is different. What you want is this. Essentially, on website.com, set GatewayPorts=clientspecified in /etc/ssh/sshd_config. --- previous (incorrect) answer --- Use the -g option. From ssh's man page: -g Allows remote hosts to connect to local ...


4

Box1 only listens on 1982 on the loopback interface. You cant use it to route traffic from other boxes with that setup. EDIT: You see that because it says localhost in your question on the line: tcp 0 0 localhost:1982 *:* LISTEN If you instead set the binding address too you should get the result you are after, ...


4

If computer A is reachable via SSH, an SSH tunnel would be indeed the way to go: computer-B$ ssh -L 1234:localhost:80 computer-A.example.com Once you're logged in, point your browser to http://localhost:1234 and the webserver on computer A should respond. With putty, there's a "Tunnels" menu underneath the "SSH" option (left side) where you can ...



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