Tag Info

Hot answers tagged

20

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 ...


20

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 ...


18

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 ...


10

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 ...


10

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 ...


7

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' ...


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

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 ...


5

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.


5

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 ...


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

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

Also, make sure to run DNS through your SSH tunnel. In firefox, this option is disabled by default. The network admin will only see encrypted traffic, as noted above. about:config > network.proxy.socks_remote_dns;true


5

Simple, run the command ssh -L 25565:minecraftserverIp:25565 user@remotelinuxbox Then add a server to your minecraft client localhost:25565 This will allow you to connect to the remote minecraft server via the ssh tunnel.


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

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

not exactly the solution for your problem, but also handy sometimes: From within an ssh session: press enter type ~ and then # shows you a list of all open connections over your tunnels for that session.


4

Figured it out. I used: ssh -f -N -L 12345:example.com:12345 me@mycorp.com I then edited my hosts file so that example.com requests to go the mycorp.com proxy. Crude but effective.


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

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

Try MyEnTunnel. It can reconnect at connections failures.


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

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

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 ...



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