Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 02-15-2010, 07:44 AM   #1
Registered: Oct 2006
Location: The Ether
Distribution: Ubuntu 16.04.7 LTS, Kali, MX Linux with i3WM
Posts: 299

Rep: Reputation: 30
Defining an SSH source port ?

When one connects to an SSH server running on a non-standard port ( i.e. not port 22) it is straightforward to alter the command syntax so you can connect to this port. Is it possible to define the source port from the local machine ? For example, can you define the source port on your local machine to be 12345 as opposed to another port chosen by your system ?

Old 02-15-2010, 08:04 AM   #2
Registered: Feb 2009
Distribution: Debian, CentOS 5, Gentoo, FreeBSD, Fedora, Mint, Slackware64
Posts: 208

Rep: Reputation: 46
As far as I know, there is no way to do this. Are there any programs that can bind a specific source port? Now, I am curious.

Last edited by nuwen52; 02-15-2010 at 08:06 AM.
Old 02-15-2010, 08:43 AM   #3
Registered: Feb 2007
Posts: 55

Rep: Reputation: 17
Source ports are dynamically assigned by OS which can be tuned by setting kernel parameter net.ipv4.ip_local_port_range but that will take effect for all applications.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Defining a port in /etc/services shads2k5 Linux - Networking 1 11-09-2008 03:48 AM
port knocking only for ssh port? xpucto Linux - Security 1 03-29-2007 08:22 AM
Howto do Secured ssh from port https or port80(standard) to ssh d listening port 22 ? Xeratul Linux - General 4 11-23-2006 06:09 AM
iptables help! DROP ssh port, but allow to connect to ssh if from 2222 port kandzha Linux - Networking 4 09-13-2006 09:10 AM
ssh over port 80 but port 80 isnt available profoX Linux - Networking 4 06-01-2006 02:12 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:13 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration