-2

I have setup on a server VMware ESXi 5.5.0. I have add the operating system Oracle Linux 5

I'm trying to setup ssh for local computers that runs on Ubuntu. But I get the error Connection refused.

I checked if the port is open on the server with "nmap 10.0.1.26" and I get the ouput

PORT   | STATE  | SERVICE 
22/tcp | closed | ssh

I also wasn't able to find the file "known_hosts"

Thank you

Elis
  • 1
  • 1
  • 1
  • Did you activate and start the SSH server? What does `chkconfig --list sshd` and `service sshd status` say? – Sven Jun 26 '14 at 11:40
  • Does not recognise the command service and chkconfig. – Elis Jun 26 '14 at 12:26
  • I have started the SSH server, but what do you mena activate? – Elis Jun 26 '14 at 12:26
  • 1
    On the server, `sudo netstat -tlnp` will let you know if there is a process listening on port 22 (and any other ports), which will partly answer @SvW's questions. The command `iptables -L -nv` on the server may also help if ssh is running and listening on port 22. – Ladadadada Jun 26 '14 at 17:00

1 Answers1

1

maybe I'm oversimplifying, but did you check if sshd is running on server 10.0.1.26?

$ /sbin/service sshd status

see: http://docs.oracle.com/cd/E18930_01/html/821-2426/gksja.html#gksrd

Brancomat
  • 21
  • 2
  • Yeap I checked and I get the output: openssh-daemon (pid 3968) is running... – Elis Jun 26 '14 at 12:24
  • Does ssh FROM your server works? Did you check firewall/iptables issues? (`iptables --list`) Also: check `/var/log/secure` on your server for error messages – Brancomat Jun 26 '14 at 13:14
  • This must be iptables. Run the following and check if it works: $ iptables -P INPUT ACCEPT $ iptables -P OUTPUT ACCEPT $ iptables -P FORWARD ACCEPT $ iptables -F if this doesn't help, try to check if sshd is defined in /etc/hosts.deny – vagarwal Jun 26 '14 at 16:06
  • I have disabled the firewall, but nothing changed – Elis Jun 27 '14 at 11:30
  • If `sshd` is running, it's not listening on 10.0.1.26 port 22. You should check `sshd_config` to see what address and port it's configured to listen on, and then maybe `netstat` to see whether something is actually listening on port 22. – Kenster Jun 27 '14 at 12:19