LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   ssh doesn't work after modify port (http://www.linuxquestions.org/questions/linux-newbie-8/ssh-doesnt-work-after-modify-port-932434/)

AKB48 03-02-2012 10:30 PM

ssh doesn't work after modify port
 
i try to modify the port with file "sshd_config"
change "Port 22" to "Port 1122"
and then restart service

but....i can't connect to the host

anyone help?thx

cbtshare 03-02-2012 10:43 PM

First you have to make sure port 1122 is open within the network you are . And then change the ssh command to
Quote:

ssh -p 1122 root@192.168.1.1

lithos 03-03-2012 04:07 AM

Try find out if you can connect if you have Firewall running and if so, try stopping it (# service iptables stop <- example on RHEL based linux)
then if you can successfully connect, you will have to open the firewall port to allow connections.

give a little more information on what system you're running (deb, ubuntu, rhel, fedora...) and what services are running (# ps aux <- should list running services and # netstat -tapln <-- should give a list of services listening ports)

AKB48 03-03-2012 04:20 AM

thx, i solve it


All times are GMT -5. The time now is 11:06 PM.