Solved

SSH Parameters

Posted on 2013-01-17
2
367 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Hello to you all, I hear of many people congratulate AWS (Amazon Web Services) on how easy it is to spin up and create new EC2 (Elastic Compute Cloud) instances, but then fail and struggle to connect to them using simple tools such as SSH (Secure…
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…
Delivering innovative fully-managed cloud services for mission-critical applications requires expertise in multiple areas plus vision and commitment. Meet a few of the people behind the quality services of Concerto.

932 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now