Ask Your Question

I can't get ssh server to run, I've done this a hundred times. What is going on?

asked 2015-03-03 12:40:28 -0500

updated 2015-03-03 15:44:40 -0500

I can't start sshd daemon on my new Fedora 21 system, I've done this a hundred times, but it won't start. This is what I've tried:

user@HOST ~$ sudo yum reinstall openssh
Loaded plugins: langpacks
Resolving Dependencies
--> Running transaction check
---> Package openssh.x86_64 0:6.6.1p1-11.1.fc21 will be reinstalled
--> Finished Dependency Resolution

Dependencies Resolved

 Package         Arch           Version                   Repository       Size
 openssh         x86_64         6.6.1p1-11.1.fc21         updates         438 k

Transaction Summary
Reinstall  1 Package

Total download size: 438 k
Installed size: 1.4 M
Is this ok [y/d/N]: y
Downloading packages:
openssh-6.6.1p1-11.1.fc21.x86_64.rpm                        | 438 kB  00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction (shutdown inhibited)
  Installing : openssh-6.6.1p1-11.1.fc21.x86_64                             1/1 
  Verifying  : openssh-6.6.1p1-11.1.fc21.x86_64                             1/1 

  openssh.x86_64 0:6.6.1p1-11.1.fc21                                            


sudo service sshd start
Redirecting to /bin/systemctl start  sshd.service

sudo systemctl start sshd

But this is always the output:

~$ ps aux | grep sshd
user 11227  0.0  0.0 113004  2296 pts/2    S+   18:34   0:00 grep --color=auto sshd

No sshd running on the system, I never seen this before.


As noted I've done this hundred of times, this is my configuration and more what I've tried:

root ~ # yum list installed openssh-server
Loaded plugins: langpacks
Installed Packages
openssh-server.x86_64                 6.6.1p1-11.1.fc21                 @updates
root ~ # ssh -p 22 username@localhost
ssh: connect to host localhost port 22: Connection refused
root ~ #


I FOUND OUT WHAT THE PROBLEM WAS, I tried to setup(with out looking at any tutorial) the listen address in sshd_config but did it wrong, when I commented out that line, it worked as normal.

Could you tell me/show me a little how the listen address is setup in the config file?

edit retag flag offensive close merge delete



Did you run the service:

systemctrl start sshd.service normally you do not need to add the port how ever will recomend to add verbose so you can see what is the issue

ssh -v user_name@localhost

also check if the service is all on your firewall

sudo firewall-cmd --list-services

Response should be something like:

dhcpv6-client samba-client ssh

see ssh is there if not then add it with

firewall-cmd --add-port=22/tcp if you require permanent add --permanent

aeperezt gravatar imageaeperezt ( 2015-03-03 15:05:28 -0500 )edit

ListenAddress is comment out if you like it to listen to all address comment it out or set it to if you want it to listen to one specific ip then you need it there for instance will do localhost

aeperezt gravatar imageaeperezt ( 2015-03-03 15:10:33 -0500 )edit

@aeperezt Do you mind editing out my user name in the ssh command in your comment, if you will I will also edit my question, I didn't mean to have that in there.

somethingSomething gravatar imagesomethingSomething ( 2015-03-03 15:14:21 -0500 )edit

@aeperezt I will take a look at listenAddress in ssh, I was going to start using that. As it brings strong security. If I'm not mistaking.

somethingSomething gravatar imagesomethingSomething ( 2015-03-03 15:16:19 -0500 )edit

@aeperezt Thank's for the attention, I'll figure it out. I'm going to find an tutorial/manual on sshd_config and set listenaddress the right way. Thank's alot.

somethingSomething gravatar imagesomethingSomething ( 2015-03-03 15:46:31 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2015-03-03 17:44:09 -0500

I figured it out, I had set (without any instructions) listenaddress in sshd_config and it wasn't the right way to do it, that's why localhost and any other host couldn't connect to the server.

I commented out the defect code, and am going to learn about setting the listener.

edit flag offensive delete link more

answered 2015-03-03 13:07:52 -0500

aeperezt gravatar image

You need to install openssh-server so you can get sshd on the machine normally it is already installed on Fedora.

edit flag offensive delete link more


@aeperezt See my edit.

somethingSomething gravatar imagesomethingSomething ( 2015-03-03 14:57:17 -0500 )edit

Question Tools

1 follower


Asked: 2015-03-03 12:40:28 -0500

Seen: 2,582 times

Last updated: Mar 03 '15