English
Ask Your Question
1

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

asked 2015-03-03 18:40:28 +0000

updated 2015-03-03 21:44:40 +0000

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
================================================================================
Reinstalling:
 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 

Installed:
  openssh.x86_64 0:6.6.1p1-11.1.fc21                                            

Complete!

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.

EDIT #1

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 ~ #

EDIT #2

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

Comments

2

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 ( 2015-03-03 21:05:28 +0000 )edit
2

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

aeperezt ( 2015-03-03 21:10:33 +0000 )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 ( 2015-03-03 21:14:21 +0000 )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 ( 2015-03-03 21:16:19 +0000 )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 ( 2015-03-03 21:46:31 +0000 )edit

2 answers

Sort by ยป oldest newest most voted
0

answered 2015-03-03 23:44:09 +0000

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
2

answered 2015-03-03 19:07:52 +0000

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

Comments

@aeperezt See my edit.

somethingSomething ( 2015-03-03 20:57:17 +0000 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Use your votes!

  • Use the 30 daily voting points that you get!
  • Up-vote well framed questions that provide enough information to enable people provide answers.
  • Thank your helpers by up-voting their comments and answers. If a question you asked has been answered, accept the best answer by clicking on the checkbox on the left side of the answer.
  • Down-voting might cost you karma, but you should consider doing so for incorrect or clearly detrimental questions and answers.

Question Tools

Follow
1 follower

Stats

Asked: 2015-03-03 18:40:28 +0000

Seen: 2,212 times

Last updated: Mar 03 '15