fedora 20

When i tried to configure my newly created virtual machine, when i tried to ssh to her, my connection are dropped.
But why?…

Let’s try to solve this situation:

I try to connect to localhost:

[root@forum ~]# ssh -vvv localhost
OpenSSH_6.4, OpenSSL 1.0.1e-fips 11 Feb 2013
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 51: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to localhost [127.0.0.1] port 22.
debug1: connect to address 127.0.0.1 port 22: Connection refused
ssh: connect to host localhost port 22: Connection refused

Dead…? Let’s try to run it again?

[root@forum ~]# chkconfig sshd on
Uwaga: przekazano żądanie do "systemctl enable sshd.service".
ln -s '/usr/lib/systemd/system/sshd.service' '/etc/systemd/system/multi-user.target.wants/sshd.service'
[root@forum ~]# service sshd start 
Redirecting to /bin/systemctl start sshd.service

Still dead?

[root@forum ~]# systemctl enable sshd.service
[root@forum ~]# systemctl start sshd.service
[root@forum ~]# systemctl status sshd.service
sshd.service - OpenSSH server daemon
 Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled)
 Active: active (running) since nie 2014-03-23 10:11:29 CET; 4min 18s ago
 Main PID: 2065 (sshd)
 CGroup: /system.slice/sshd.service
 L¦2065 /usr/sbin/sshd -D
mar 23 10:11:29 forum.local.localhost systemd[1]: Started OpenSSH server daemon.
mar 23 10:11:29 forum.local.localhost sshd[2065]: Server listening on 0.0.0.0 port 22.
mar 23 10:15:41 forum.local.localhost systemd[1]: Started OpenSSH server daemon.
[root@forum ~]#

Finally, it’s available…

 

Check also:

  • firewall settings
  • /etc/ssh/sshd_config – is “PermitRootLogin yes” set to allow root login?