Solved

SSH Parameters

Posted on 2013-01-17
2
373 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 500 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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

Suggested Solutions

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…
When it comes to security, there are always trade-offs between security and convenience/ease of administration. This article examines some of the main pros and cons of using key authentication vs password authentication for hosting an SFTP server.
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…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

809 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