Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

SSH Parameters

Posted on 2013-01-17
2
Medium Priority
?
398 Views
Last Modified: 2013-01-30
There is  script in Linux to test the connection :

ssh -f -L 3307:127.0.0.1:3306 hkadmin@192.168.1.41 -p 22 sleep 60 &> /dev/null &

1. What do 3307 & 3306 represent ?
2. What does the parameter -f , -L & -p represent ?

Tks
0
Comment
Question by:AXISHK
2 Comments
 
LVL 14

Accepted Solution

by:
theras2000 earned 2000 total points
ID: 38790244
3307 is the port that other computers will connect to you on and 3306 is the port that you'll forward their request to.  I could explain more but I'd just be retyping this great tutorial.
http://support.suso.com/supki/SSH_Tutorial_for_Linux
Jump down to the TCP Port Forwarding  section.

Here's another reference:
http://linux.about.com/od/commands/l/blcmdl1_ssh.htm
ssh [-afgknqstvxACNTX1246 ] [-b bind_address ] [-c cipher_spec ] [-e escape_char ] [-i identity_file ] [-l login_name ] [-m mac_spec ] [-o option ] [-p port ] [-F configfile ] [-L porthosthostport ] [-R porthosthostport ] [-D port ] hostname | user@hostname [command ]

You can see that -f tells it to hide the password by running it in the background.
-L is to specify that your host and ports are coming next.
-p is the destination port on the remote host, but judging by the 1st tutorial, I don't think it should be used in your example, with port forwarding.
0
 

Author Closing Comment

by:AXISHK
ID: 38837868
Tks
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We all know how boring and exhausting it is to transfer huge web projects developed locally to a webserver simply via FTP. The File Transfer Protocol is a really nice solution if you need to transfer small amounts of files, but if you're plannin…
Secure Shell (SSH) is a network protocol for secure data communication, mainly used to administer remote Unix / Linux servers via command line. But it also allows the user to open a secure tunnel between a client and a server where he can send any k…
Viewers will learn how to properly install and use Secure Shell (SSH) to work on projects or homework remotely. Download Secure Shell: Follow basic installation instructions: Open Secure Shell and use "Quick Connect" to enter credentials includi…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…

972 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question