1 |
On Monday 20 Aug 2012 04:48:40 Canek Peláez Valdés wrote: |
2 |
> On Sun, Aug 19, 2012 at 10:31 PM, David Relson <relson@×××××××××××××.com> |
3 |
wrote: |
4 |
> > G'day, |
5 |
> > |
6 |
> > I've volunteered to do some data entry for my local bike club. This |
7 |
> > involves a java application (jar file) and a tunnel to a mysql |
8 |
> > server. I have detailed PuTTY configuration instructions but haven't |
9 |
> > yet succeeded in converting them to ssh options. |
10 |
> > |
11 |
> > The configuration options include: |
12 |
> > Seconds between keepalives -- 120 |
13 |
> > Don't start a shell or command |
14 |
> > |
15 |
> > Forwarded port: |
16 |
> > source port number - PORT |
17 |
> > Destionation: MACHINE.DOMAIN.COM |
18 |
> > |
19 |
> > Host - IP_Address |
20 |
> > Login - userid |
21 |
> > Password - pw |
22 |
> > |
23 |
> > Using "ssh -N userid@IP_Address" gives me a password prompt and no |
24 |
> > command prompt - both good. |
25 |
> > |
26 |
> > How do I specify the forwarded port? |
27 |
> |
28 |
> If I understand correctly, with -L: |
29 |
> |
30 |
> ssh -L XX:machine2:YY user@machine1 |
31 |
> |
32 |
> This command will connect you to the "machine1" host with user "user", |
33 |
> and any connection to the port XX to the machine you are running the |
34 |
> ssh command from, will redirect the connection to the "machine2" host |
35 |
> in the YY port. |
36 |
|
37 |
If you want to forward a local port XX to a remote port YY then Canek's |
38 |
suggestion will do what you want, assuming that the correct remote application |
39 |
is listening on port YY. |
40 |
|
41 |
When you have more than one application this can soon become tedious. So, if |
42 |
you want to set up the remote machine as a SOCKS proxy so that any socks-ified |
43 |
applications on the local machine can connect to the remote SOCKS, then you |
44 |
can use: |
45 |
|
46 |
ssh -N -D XXXX user@machine1 |
47 |
|
48 |
For applications that do not have built in proxy capability you can use e.g. |
49 |
proxychains. |
50 |
|
51 |
HTH. |
52 |
-- |
53 |
Regards, |
54 |
Mick |