Tag Info

Hot answers tagged

34

As a more concrete version of Kyle's answer, what you want to put in your ~/.ssh/config file is: host foo User webby ProxyCommand ssh a nc -w 3 %h %p host a User johndoe Then, when you run "ssh foo", SSH will attempt to SSH to johndoe@a, run netcat (nc), then perform an SSH to webby@foo through this tunnel. Magic! Of course, in order to do this, ...


16

Copying from source to target where target has sshd running: dd if=/dev/sda | gzip | ssh root@target 'gzip -d | dd of=/dev/sda' Copying from source to target via sshd_host when target is not running sshd. Target: nc -l -p 62222 | dd of=/dev/sda bs=$((16 * 1024 * 1024)) Source: ssh -L 62222:target:62222 sshd_host & Source: dd if=/dev/sda | nc ...


15

As you expected, this happens because SSH won't exit if there are outstanding connections going through the tunnel. If you exit your browser (and all other programs that are going through the port 9000 tunnel) then SSH should exit. The ssh man page says: The session terminates when the command or shell on the remote machine exits and all X11 and TCP ...


13

You are asking it to listen on your local port 22 and forward connections to a remote system's port 8090. You can't do that as your local port 22 is already taken by your local SSH server. I think what you are looking for is remote forwarding. Replacing -L 22:localhost:8090 with -R 8090:localhost:22 will tell the remote host to listen on port 8090 and ...


11

You want to use key-based auth for this. There are dozens of questions here on SF on the topic as well as countless tutorials on the web that can walk you through how to get this set up. Not only will using key auth allow for the automation you need, but it is also a more secure means of authentication (assuming that you disable password auth at some ...


9

From the puTTY documentation, specifically, 4.23 The Tunnels Panel section: Set one of the ‘Local’ or ‘Remote’ radio buttons, depending on whether you want to forward a local port to a remote destination (‘Local’) or forward a remote port to a local destination (‘Remote’). Alternatively, select ‘Dynamic’ if you want PuTTY to provide a local SOCKS 4/4A/5 ...


9

Your problem is in binding a listener to localhost:22; there's already an sshd listening on that. Tunnelling an ssh connection through an ssh connection is completely lawful, and I do it all the time, but you need to pick unused ports for your forwarding listeners. Try me% ssh user@100.100.100.100 -L 2201:192.168.25.100:22 then me% ssh localhost -p ...


9

The error message ERROR 1130 (HY000): Host '178.135.138.61' is not allowed to connect to this MySQL server is coming from MySQL. To allow remote access for user root then you need to specifically allow this for the particular database, on the mysql server mysql -u root -p mysql> grant all privileges on somedatabase.* to 'root'@'178.135.138.61' ...


7

I know cherokee management works this way, so let's say you have bound your webserver to your localhost on port 8080 ssh -L 8080:localhost:8080 your_servers_ip After that you can access the remote interface through http://localhost:8080 and every request will be forwarded to the remote IP running your webserver.


7

Yes. Configure the vsftp server to listen only on 127.0.0.1: this can be done in the vsftp.conf file: listen_address 127.0.0.1 To use this parameter, the server needs to be in standalone mode: listen yes If you want to use IPv6, use these entries instead: listen_ipv6 yes listen_address6 ::1 This is the same as the first, but uses IPv6. You'll ...


7

I would ask the IT department. There is a reason why they have installed this firewall and what you are trying to do may be against the security policy. They have to know that you need to access this server from outside of the company network. If there is no problem regarding the security policy, they will help you to have this access.


7

ssh -L <localport>:<server2>:<server2-port> user@host Example: ssh -L 5050:server2.company.com:5050 user@host Add -f to let the ssh session run in the background. Add -g to let other hosts connect to server1s locally forwarded port.


7

The answer from jscott is correct, however after reading it, it was still not completely clear to me when should I use local and when remote. So I researched further, and I have found the answer here: Use local if you need to if you have a service running on a machine that can be reached from the remote machine, and you want to access it directly from the ...


7

There is no need to use nginx. In your ssh daemon configuration (it should be /etc/ssh/sshd_config) set GatewayPorts to clientspecified and reload it. This is necessary for other systems to be able to connect to your tunnel. Without it, only programs running on your server will be able to use it. Now all you need to do is modify your ssh command to listen ...


7

WebDAV over SSL is as secure as the SSL implementations in the server and the client, the mechanism used for user authentication, and your trust with the certificates in use to authenticate the server computer and, if you're really paranoid, to authenticate the client computer (mutual SSL authentication isn't common, but it's certainly possible and used in ...


7

The reason you can't do this is because you're trying to forward port 22 on the local computer to port 8090 on the remote server and something is already running on port 22 on the local server. Mostly likely you have an SSH server running. You can fix this by changing the 22 to a different value. You can check to see if a port is free by running: # netstat ...


7

I'm not familiar with DownThemAll, but I see that it's a Firefox extension. So you could try running trickle to launch Firefox with a download limit (see man trickle). For example: trickle -d 20 firefox That will set a download limit of 20 KB/s. For completeness, users running Windows can do the same by using the Firefox Throttle add-on.


7

This being a tunnel opened at a remote server, that server needs to have GatewayPorts set to yes in its /etc/ssh/sshd_config. Depending on what kind of users that server have you might want to use the Match option to limit that capability to your user. Match User middleuser GatewayPorts yes Do note that you probably want to add this Match block in the ...


6

Avery Pennarun's sshuttle works similar to Vi's answer, but requires less setup and works on BSD and OS X as well as Linux.


6

I trust you can already SSH to a system on the remote private network (10.0.0.0). If your local system is running openssh, add to your $HOME/.ssh/config: Host gatewaymachine LocalForward 12080 remote_ip:portnum Where 'remote_ip' is the IP address of the remote clustermachine system where gdbserver runs, and portnum is the port that it listens on. SSH to ...


6

You can use the ProxyCommand directive in your ~/.ssh/config file, for example to use netcat as the relay: host server2 ProxyCommand ssh server1 nc server2 22 The you would just use 'ssh server2'. The man page information for this directive is found in 'man ssh_config'


6

You can use scp to copy single or multiple files and also use rsync with an ssh transport: scp -r localdirectoryname username@hostname:/remotepath and rsync -av localdirectory username@hostname:/remotepath Both programs also work the other way round, with the remote part as the origin and the local as the destination. See man scp and man rsync. ...


6

You can use a command like: $ ssh -t user@server1 ssh user@server2 This command ssh you to the server2 via server1. You will be prompted for two passwords consecutively to login to server1 and then to server2. If you setup the needed SSH keys, you will should be logged in automatically to server2. This is very useful when you can't login directly to ...


6

This type of functionality was added into OpenSSH version 5.4 and can be used by doing ssh -W server2 server1 Where server2 is your intended destination and server1 is your proxy host. You can make this easier by using the ProxyCommand option in your ssh config, something like: host = *.example.com user = packs port = 22 ProxyCommand ssh -W %h:%p server1 ...


6

If you check the ssh man page, you'll find there is a config option called ExitOnForwardFailure and you can specify it on the command line by adding: -o "ExitOnForwardFailure yes" All the ssh config options are described in the ssh_config and sshd_config man pages. If you find the option is not supported, you may have to upgrade to a newer version of ssh. ...


5

You can use the ssh ProxyCommand functionality for this. Assume serverA is your jump host, and serverB is the ultimate server you want to connect to. Add the following to your ~/.ssh/config file: Host serverB Hostname serverB.example.com User jimbob ProxyCommand ssh serverA.example.com nc %h %p 2> /dev/null Then from your workstation, just ...


5

You fix the corporate firewall to allow SSH in. You may not have control over the firewall, but if there is a business need for the access then any sensible corporate policy should permit it, and if you work for someone that doesn't have sensible policies, then hie thee to http://careers.serverfault.com/.


5

The short answer is to simply give up on using SMB over a high-latency link. The protocol preforms badly over high-latency links because it has many operations that require many round trips for acknowledgement. Tunning TCP over TCP also results in issues will work for both the SSH and the encapsulated protocol. If you can get the client and server to ...


5

So to clarify: You want passwords to be allowed from the office network, but not from anywhere else. You, however, need to be able to connect from anywhere. On my network SSH keys are required when logging in from outside but either keys or passwords can be used when connecting from another host on the inside. Here's how that works: /etc/ssh/sshd_config ...


5

By far, the easiest way is to just copy it via scp. Plus, this syntax actually works unlike some of the other suggestions. You can't beat this syntax for ease. It allows you to recursively copy, rsync or what ever you'd like without the hassle of considering potentially complex pipes. This syntax is intuitively clear, will be more readily supportable ...



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