I just downloaded CentOS 5 from here
http://mirror.centos.org/centos/5/isos/ and installed it without any problems that I know of.
I am having trouble connecting to the machine via SSH and I can't figure out why. I have NEVER set up SSH and am pretty new to Linux so this very well could be a glaringly obvious mistake or something basic that I just don't know to do.
The first thing I did was search the net for "how to set up ssh on centos" and it returned a few pages that I read through and followed directions. The first was
http://wiki.centos.org/HowTos/Network/SecuringSSH . I went through this page and disabled root logins, limited users to 1 user:
AllowUsers testUser
Disabled protocol 1, changed to a non-standard port (I used 2369), then logged into my router and forwarded TCP for port 2369 to 192.168.1.111 (which is the IP I got when I did an ifconfig on my CentOS box. Those are the only changes I made, I didn't filter at the firewall or set up any keys.
I then downloaded SSH Secure Shell for Windows so that I could connect to my CentOS box. After installing, opening, and trying Quick Connect I realized that I have no idea what I need to put in the hostname. So I searched and found how to change or set up my host name here
http://www.electrictoolbox.com/chang...stname-centos/ . I followed all the steps so that my /etc/sysconfig/network file looks like this:
NETWORKING="yes"
GATEWAY="10.1.1.1"
HOSTNAME="www.testsshaddress.com"
...and my /etc/hosts file looks like this:
192.168.1.111
www.testsshaddress.com localhost localhost.localdomain
This could be where I went wrong as I have no idea if those host names have to be anything in particular or if I can just make them up as I am just trying to get SSH working within my local network at the moment. Anyway, I can type "hostname" at prompt and get the correct hostname that I set up "www.testsshaddress.com".
So I went to my Windows SSH client and used
www.testsshaddress.com for the Host Name, testUser for the User Name, 2369 for the Port Number, and tried Authentication Method as "Profile Settings" and "Password". It tries for a while and then fails giving me the message:
The host 'www.testsshaddress.com' is unreachable.
The host may be down, or there may be a problem with the network connection.
Sometimes such problems can also be caused by a misconfigured firewall.
I also tried with my local IP for the Host Name (192.168.1.111) and got the same message. This is a different message than the one you get when you just type random letters into the host name which results in:
The host 'www.dfkjnisoidnf.com' is unknown.
so I am assuming that it is at least recognizing the host but something is still going wrong. Looking at the error I go I tried to look into making some changes to the iptables and found a page that led me to typing this at prompt:
iptables -A INPUT -p tcp --dport 2369 -j ACCEPT
That's all I did with iptables as I found that whole thing very confusing. Is that maybe where I need to make changes? Sorry for the huge post. I tend to over explain things on forums to try to make everything as clear as possible.
Any help is greatly appreciated!