Sponsored Content
Top Forums Shell Programming and Scripting Query regarding PuTTY SSH Tunneling Post 303004041 by drysdalk on Monday 25th of September 2017 04:51:01 PM
Old 09-25-2017
Hi,

Apologies if I'm mis-understanding you here, but I don't think SSH tunneling is quite what you're looking for here. In general, the purpose of SSH tunneling is to map some port on your own local workstation (the system on which the SSH client is running) to some other IP address and/or port on the remote side of the connection (the end on which the SSH server is running).

So, one example (and something I often used to do). Let's say you have an SSH account on unix.acme.com, which is externally accessible via SSH from the Internet. On that same network there is another host, let's say a Windows server called windows.acme.com. You want to RDP into windows.acme.com, but it doesn't have port 3389 (the RDP port) open to the outside world.

One thing you could do in that situation is use an SSH tunnel. So, from your own system (which is neither unix.acme.com nor windows.acme.com, but is something entirely different) you set up an SSH connection to unix.acme.com with a tunnel configured to re-direct, let's say port 3900 on your own local machine to port 3389 on windows.acme.com. You choose 3900 in case there is already something running port 3389 on your own local machine, which if it is typical Windows PC there very well may be (its own RDP listener). You can then RDP to localhost:3900, and your connection is transparently passed through to port 3389 on windows.acme.com, giving you a graphical login session there.

Now the situation you describe is somewhat different. You want to actually re-present to the outside world a service which is running on one port, on to another different port. That's not what SSH tunneling can really be used for. It can only really "connect" a TCP port on your local machine, on which your SSH client is running, to another TCP port either on the remote server or another server to which it has access on its own local network. You are the only one who will ever be able to use the tunnel, as it will exist solely on your own local PC. No-one would ever be able to then use the same port externally to get the service at the remote end in another way.

I hope this makes sense. If I've mis-understood something then I apologise, and if you can explain a bit more about why you feel SSH tunneling is the best solution here for you then I can have another crack at helping you out.

Edit: in terms of an actual solution, this is more a job for the firewall. Firewalls generally offer a way to translate incoming connections on one IP and/or port to another address and/or port. Either that, or just configure the service on dev.techx.com to listen on a different port, or multiple ports.

Last edited by drysdalk; 09-25-2017 at 05:56 PM..
 

10 More Discussions You Might Find Interesting

1. Solaris

ssh tunneling

Hi, I have tried the following: on PC1 (win xp) I have created ssh connection with port forwarding (local 8888 to remote 8888) to server1. >From server1 I have created another ssh connection with port forwarding to server2(local 8888 to remote 1521). When I try to connect to oracle... (3 Replies)
Discussion started by: goran00
3 Replies

2. UNIX for Advanced & Expert Users

SSH Tunneling

Hi all question - there are 2 servers A + B. server A is connected to the internet and running a squid proxy server - server B is behind a firewall. I can ssh from A to B but not from B to A. I need internet access on B to update some files. I thought I could use some sort of ssh tunnel to... (1 Reply)
Discussion started by: silvaman
1 Replies

3. Filesystems, Disks and Memory

Tunneling NFS through SSH????

Hello Folks, Im trying to pass the NFS Shared data through the SSH tunnel. Following are the Steps for my Executions: A) Commands Executed on Server (NFS Server + SSHD Server running) i) share -F nfs -o rw=<NFS Server IP> /home ii) Start the NFS Server Services and SSHD Services. ... (3 Replies)
Discussion started by: ImpeccableCode
3 Replies

4. UNIX for Advanced & Expert Users

tunneling commands and file transfers through established ssh connection

Hi - I frequently run commands, and transfer files to/from a host that uses SecurID ssh authentication. It is a real pain to have to enter the authentication information every time I want to interact with this host. I am wondering if there is a way to establish a one-time ssh connection to this... (2 Replies)
Discussion started by: cpp6f
2 Replies

5. Infrastructure Monitoring

Tunneling UDP via SSH

Performing UDP tunneling through an SSH connection Found this while looking for a way to temporarily forward SNMP requests across otherwise disconnected networks. Might be useful for someone else, too. (1 Reply)
Discussion started by: pludi
1 Replies

6. UNIX for Dummies Questions & Answers

SSH port forwarding/tunneling

So this seems like something that should be simple...but I can't quite seem to get it up and running. I have a machine, .107 with a GUI on port 8443. The problem is that I can't connect directly to .107 from my laptop. Now I have another machine, .69 that can connect to .107. So shouldn't I be able... (4 Replies)
Discussion started by: DeCoTwc
4 Replies

7. Shell Programming and Scripting

Are free public shells for ssh tunneling safe?

Is it secure to use free shells for ssh tunneling? Can the shell provider see and log the sites I visit and passwords I enter? I'm new to this thing and couldn't find info on google :o (5 Replies)
Discussion started by: rafunk
5 Replies

8. UNIX for Advanced & Expert Users

Server access for SSH Tunneling!

Hi! I came to know about SSH Tunneling to bypass the Firewall. I will have to setup a free access SSH server to tunnel data access through PUTTY or OpenSSH. The problem is that I don't know about any free access servers. So, can anyone of you guide me for that, for any type of help? (1 Reply)
Discussion started by: nixhead
1 Replies

9. Shell Programming and Scripting

Get SQL query result to file in putty

How to Get SQL query result to file in putty? I have one SQL query and I want that query output to be redirected to the file. uname -a SunOS XXX 5.8 Generic_117350-58 sun4u sparc SUNW,Sun-Fire-480R Please suggest. (7 Replies)
Discussion started by: pamu
7 Replies

10. UNIX for Dummies Questions & Answers

Ssh tunneling

I want to perform ssh tunnelling for which I have been using PuTTy. Config is as follows: Host IP: 172.XX.XX.111Port: 22Tunnel setting source port: 19005Destination: 172.XX.XX.40:1521After entering my user ID and password, I am able to see in my command prompt that 127.0.0.1:19005 is listening.... (1 Reply)
Discussion started by: aakashsoor
1 Replies
GODOC(1)						      General Commands Manual							  GODOC(1)

NAME
godoc - extracts and generates documentation for Go programs SYNOPSIS
godoc [flag] command [ name ... ] DESCRIPTION
Godoc extracts and generates documentation for Go programs. It has two modes. Without the -http flag, it runs in command-line mode and prints plain text documentation to standard output and exits. If both a library package and a command with the same name exists, using the prefix cmd/ will force documentation on the command rather than the library package. If the -src flag is specified, godoc prints the exported interface of a package in Go source form, or the implementation of a specific exported language entity: godoc fmt # documentation for package fmt godoc fmt Printf # documentation for fmt.Printf godoc cmd/go # force documentation for the go command godoc -src fmt # fmt package interface in Go source form godoc -src fmt Printf # implementation of fmt.Printf In command-line mode, the -q flag enables search queries against a godoc running as a webserver. If no explicit server address is specified with the -server flag, godoc first tries localhost:6060 and then http://golang.org. godoc -q Reader godoc -q math.Sin godoc -server=:6060 -q sin With the -http flag, it runs as a web server and presents the documentation as a web page. godoc -http=:6060 By default, godoc looks at the packages it finds via $GOROOT and $GOPATH (if set). Additional directories may be specified via the -path flag which accepts a list of colon-separated paths; unrooted paths are relative to the current working directory. Each path is considered as an additional root for packages in order of appearance. The last (absolute) path element is the prefix for the package path. For instance, given the flag value: path=".:/home/bar:/public" for a godoc started in /home/user/godoc, absolute paths are mapped to package paths as follows: /home/user/godoc/x -> godoc/x /home/bar/x -> bar/x /public/x -> public/x When godoc runs as a web server and -index is set, a search index is maintained. The index is created at startup. The index contains both identifier and full text search information (searchable via regular expressions). The maximum number of full text search results shown can be set with the -maxresults flag; if set to 0, no full text results are shown, and only an identifier index but no full text search index is created. The presentation mode of web pages served by godoc can be controlled with the "m" URL parameter; it accepts a comma-separated list of flag names as value: all show documentation for all declarations, not just the exported ones methods show all embedded methods, not just those of unexported anonymous fields src show the original source code rather then the extracted documentation text present the page in textual (command-line) form rather than HTML flat present flat (not indented) directory listings using full paths For instance, http://golang.org/pkg/math/big/?m=all,text shows the documentation for all (not just the exported) declarations of package big, in textual form (as it would appear when using godoc from the command line: "godoc -src math/big .*"). By default, godoc serves files from the file system of the underlying OS. Instead, a .zip file may be provided via the -zip flag, which contains the file system to serve. The file paths stored in the .zip file must use slash ('/') as path separator; and they must be unrooted. $GOROOT (or -goroot) must be set to the .zip file directory path containing the Go root directory. For instance, for a .zip file created by the command: zip go.zip $HOME/go one may run godoc as follows: godoc -http=:6060 -zip=go.zip -goroot=$HOME/go See "Godoc: documenting Go code" for how to write good comments for godoc: http://golang.org/doc/articles/godoc_documenting_go_code.html OPTIONS
-v verbose mode -q arguments are considered search queries: a legal query is a single identifier (such as ToLower) or a qualified identifier (such as math.Sin). -src print (exported) source in command-line mode -tabwidth=4 width of tabs in units of spaces -timestamps=true show timestamps with directory listings -index enable identifier and full text search index (no search box is shown if -index is not set) -index_files="" glob pattern specifying index files; if not empty, the index is read from these files in sorted order -index_throttle=0.75 index throttle value; a value of 0 means no time is allocated to the indexer (the indexer will never finish), a value of 1.0 means that index creation is running at full throttle (other goroutines may get no time while the index is built) -write_index=false write index to a file; the file name must be specified with -index_files -maxresults=10000 maximum number of full text search results shown (no full text index is built if maxresults <= 0) -path="" additional package directories (colon-separated) -html print HTML in command-line mode -goroot=$GOROOT Go root directory -http=addr HTTP service address (e.g., '127.0.0.1:6060' or just ':6060') -server=addr webserver address for command line searches -templates="" directory containing alternate template files; if set, the directory may provide alternative template files for the files in $GOROOT/lib/godoc -url=path print to standard output the data that would be served by an HTTP request for path -zip="" zip file providing the file system to serve; disabled if empty AUTHOR
This manual page was written by Michael Stapelberg <stapelberg@debian.org>, for the Debian project (and may be used by others). 2012-05-13 GODOC(1)
All times are GMT -4. The time now is 01:47 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy