LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-01-2008, 07:17 PM   #1
SimbaSpirit
Member
 
Registered: Feb 2008
Posts: 109

Rep: Reputation: 15
ssh - cannot connect after changing port


Ubuntu 7.10

I typed
Quote:
sudo nano /etc/ssh/sshd_config
and changed Port22 to Port 1223

then
Quote:
sudo nano /etc/ssh/ssh_config
I uncommented # Port 22
and changed 22 to 1223.

then
Quote:
sudo /etc/init.d/ssh restart
restarted ok.

Now I try to connect using PuTTY
IP is unchanged, so thats fine,
changed the port to 1223.

The result: the server refuses the connection and PuTTY bugs and uses half my processor til I kill process lol.

The tutorials I'm finding tell me its that easy - so what am I doing wrong?

TIA,
SS
 
Old 03-01-2008, 07:49 PM   #2
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Are you using any IP filtering or access control (iptables or tcp wrappers)?

If you don't know the answer, then post the results of # iptables -nvL (in code tags).

-------
edit: If you want to lock down sshd, instead of playing games with port numbers, do the following...

First set these directives in /etc/ssh/sshd_config:
  • Protocol 2
  • PermitRootLogin no

Next, learn about enabling pubkey authentication and disabling all other authentication forms.

Keep openssh up to date as security fixes are released.

Last edited by anomie; 03-01-2008 at 07:53 PM.
 
  


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
Problem with changing the ssh port Raakh Linux - Newbie 13 12-24-2007 02:23 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
Changing the port on SSH Coldmiser SUSE / openSUSE 5 03-29-2006 08:25 PM
changing ssh port dannyk1 Linux - Security 7 06-17-2005 08:05 AM
Changing SSH Port taran Linux - Networking 2 08-10-2003 11:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:03 AM.

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