LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-06-2012, 10:15 AM   #46
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899

You are running the daemon on port 2222
So edit the sshd conf file to put it back to 22.

Kind regards
 
1 members found this post helpful.
Old 01-06-2012, 10:18 AM   #47
newbie14
Member
 
Registered: Sep 2011
Posts: 646

Original Poster
Rep: Reputation: Disabled
Dear Repo,
So currently my ssh is running on 2222 that means to edit it the right file is the sshd_config and why when we do ssh -vvv just now is pointing to 22? After changing I must change the router port forwarded back to 22 right?
 
Old 01-06-2012, 10:22 AM   #48
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Quote:
So currently my ssh is running on 2222 that means to edit it the right file is the sshd_config
yes
Quote:
why when we do ssh -vvv just now is pointing to 22?
because ssh default connect using port 22, hence that's why you use the -p option, to change the port.
Quote:
After changing I must change the router port forwarded back to 22 right?
yes

Kind regards
 
1 members found this post helpful.
Old 01-06-2012, 10:32 AM   #49
newbie14
Member
 
Registered: Sep 2011
Posts: 646

Original Poster
Rep: Reputation: Disabled
Dear Repo,
Thank you for the help. I am confuse which -p are u referencing to # in the sshd_config is it?
 
Old 01-06-2012, 10:36 AM   #50
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Quote:
repo@cannabis repo]$ ssh -p 2222 60.50.38.221
so the -p option tells ssh to connect to the ssh server using port 2222 instead of the default 22
Quote:
Which file must I edit to edit the default ssh port?
sshd_config, so it will listen on the port you specify.

Kind regards

Last edited by repo; 01-06-2012 at 10:37 AM.
 
Old 01-06-2012, 10:41 AM   #51
newbie14
Member
 
Registered: Sep 2011
Posts: 646

Original Poster
Rep: Reputation: Disabled
Dear Repo,
Thank you now I am fully clear of things.
 
1 members found this post helpful.
Old 01-06-2012, 10:46 AM   #52
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
No poblem.

Kind regards
 
  


Reply



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
Unable to access CentOS web server externally rahilmaknojia Linux - Server 4 11-05-2011 05:00 PM
SSH not working externally Ryan_Sutton Linux - Newbie 6 11-18-2008 05:01 PM
SSH and CentOs, need help HyperTrey Linux - Desktop 6 10-18-2006 03:22 PM
CentOS 3.4 SSH Hangup wired420 Linux - General 3 01-27-2005 11:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:05 PM.

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