Results 1 to 10 of 15
I need to change my ssh port from 22. What is the line command for rh linux to do this????...
- 01-28-2009 #1Just Joined!
- Join Date
- Dec 2007
- Posts
- 15
Changing ssh port by cl
I need to change my ssh port from 22. What is the line command for rh linux to do this????
- 01-29-2009 #2
You can change the Port value in the
/etc/ssh/sshd_config file
- 04-14-2009 #3Just Joined!
- Join Date
- Dec 2007
- Posts
- 15
ok, so i changed the port and did a save. i even cat out the file again to make sure the port said it was changed. I then did a updatedb and tried to login internally using the new port i assigned but it wouldnt let me in. It still let me in under the old 22 port. What am i doing wrong???
- 04-14-2009 #4
You have to restart the ssh service so it will reread the config file.
- 04-14-2009 #5
- 04-15-2009 #6Just Joined!
- Join Date
- Dec 2007
- Posts
- 15
is this what i use if i have redhat 5
- 04-15-2009 #7Linux Enthusiast
- Join Date
- Aug 2006
- Location
- Portsmouth, UK
- Posts
- 539
Firemaster posted correct command for RHEL 5
RHCE #100-015-395
Please don't PM me with questions as no reply may offend, that's what the forums are for.
- 04-15-2009 #8Just Joined!
- Join Date
- Dec 2007
- Posts
- 15
neither of the commands worked
[root@localhost m*****]# service ssh restart
bash: service: command not found
[root@localhost m*****]# service sshd restart
bash: service: command not found
[root@localhost mol*****]# /etc/init.d/ssh restart
bash: /etc/init.d/ssh: No such file or directory
[root@localhost m*****]# sudo /etc/init.d/ssh restart
sudo: /etc/init.d/ssh: command not found
[root@localhost m*****]# cd
[root@localhost ~]# cd
[root@localhost ~]# serice sshd restart
bash: serice: command not found
- 04-15-2009 #9Just Joined!
- Join Date
- Jan 2007
- Posts
- 4
It's service sshd restart. You're typing service ssh restart. The original poster entered the correct command, you just missed a letter =)
- 04-16-2009 #10Just Joined!
- Join Date
- Dec 2007
- Posts
- 15


Reply With Quote
