LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 03-28-2010, 10:51 AM   #1
salimshahzad
Member
 
Registered: Dec 2009
Posts: 200

Rep: Reputation: 15
ssh port not working


dear gurus

i have centos 5.4

i change port in /etc/ssh/ssh_config and restart sshd service

when i try to access, the new port not working and old port still responding from windows pc. then suddenly i found port 22 and new port stop responding no more.i use putty or securecrt from my window pc. then i connect 1 more linux box from there i do <ssh> i found it is still using port 22

i am not using any firewall or route nothing block it is testing on network.

then also i were using scp jobs in crontab that stop working.

highly appreciate in advanced

kind regards
salim
 
Old 03-28-2010, 11:01 AM   #2
troop
Member
 
Registered: Feb 2010
Distribution: gentoo, arch, fedora, freebsd
Posts: 379

Rep: Reputation: 96
You should change port in /etc/ssh/sshd_config
/etc/ssh/ssh_config is ssh client for
 
Old 03-28-2010, 11:02 AM   #3
smoker
Senior Member
 
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 249Reputation: 249Reputation: 249
try editing /etc/ssh/sshd_config
the clue was when you edited /etc/ssh/ssh_config and then restarted sshd service.
 
Old 03-29-2010, 07:37 AM   #4
salimshahzad
Member
 
Registered: Dec 2009
Posts: 200

Original Poster
Rep: Reputation: 15
i change the port to 9999, and restart sshd and network service it does not work. the changing port has no effect on machine. it still connect ssh with port 22, what else could be missing, no firewall or selinux security in between i am testing overlan.

ssh -p 9999 10.1.1.193
ssh: connect to host 10.1.1.193 port 9999: Connection refused
[root@zamanda ~]# ssh -p 10.1.1.193
Bad port '10.1.1.193'
[root@zamanda ~]# ssh -p 22 10.1.1.193
The authenticity of host '10.1.1.193 (10.1.1.193)' can't be established.
RSA key fingerprint is 10:db:59:df:20:86:cc:05:2c:c7:8f:8f:6e:73:5d:78.
Are you sure you want to continue connecting (yes/no)? no
Host key verification failed.
 
Old 04-05-2010, 02:15 AM   #5
jettwa2001
Member
 
Registered: Dec 2007
Posts: 36

Rep: Reputation: 15
Wink

Hi There,

I'm using centos as well in order for your ssh to work you must open the port in your local fire wall by typing the following:

from the command line type:

setup

go to firewall configuration

go to customize

under port add your port number

P.S like the other said make sure you do all your ssh configuration in:

/etc/sshd_config

Goodluck

Jettwa
 
Old 04-05-2010, 02:18 AM   #6
jettwa2001
Member
 
Registered: Dec 2007
Posts: 36

Rep: Reputation: 15
sorry

/etc/ssh/sshd_config

BTW you must add the info I told you even if your firewall is disable.
 
  


Reply


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
ssh port forwarding not working tommiy Linux - Networking 1 04-22-2007 09:33 AM
port knocking only for ssh port? xpucto Linux - Security 1 03-29-2007 09: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 07:09 AM
iptables help! DROP ssh port, but allow to connect to ssh if from 2222 port kandzha Linux - Networking 4 09-13-2006 10:10 AM
New firewall: ssh on port 80 not working anymore... norbi99 Linux - Security 4 10-09-2004 10:14 AM


All times are GMT -5. The time now is 04:38 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration