Solved

SSH Parameters

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

705 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

19 Experts available now in Live!

Get 1:1 Help Now