Solved

SSH Parameters

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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

Suggested Solutions

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…
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…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

803 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