Ask / Submit
4

sshd connection failed, likely due to broken openssh package

asked 2014-02-15 15:35:22 +0300

wcr gravatar image

updated 2014-02-23 01:05:35 +0300

I think I have tried everything, but I cannot connect from my linux laptop to the jolla, using sshd over the wlan connection. From sailfish, I can easily reach the laptop, but from the laptop, I consistently get

ssh: connect to host 192.168.1.31 port 22: Connection refused

The IP number is correct, Developer mode is activated, a password has been set, and I have not changed any settings. What am I missing here?

edit retag flag offensive close delete

Comments

I'm with the same settings - everything connects fine. Maybe on a laptop firewall blocking the connection? Try to disable the firewall.

Victorious ( 2014-02-15 15:47:06 +0300 )edit

thanks, but no... As I've said, I can connect FROM jolla TO the laptop, and I can also connect between all other machines here at home. But somehow the port has been blocked...

wcr ( 2014-02-15 16:18:59 +0300 )edit

Have you tried 'ssh nemo@192.168.1.31'

abc123 ( 2014-02-15 20:33:14 +0300 )edit

absolutely, that's what I have done and what provokes the error message given above.

wcr ( 2014-02-15 20:53:09 +0300 )edit

Happened also to me sometimes, but finally, after several tries, succeeded. Very strange.

lasse ( 2014-02-21 20:03:36 +0300 )edit

6 Answers

Sort by » oldest newest most voted
4

answered 2014-02-22 23:31:32 +0300

vmatare gravatar image

updated 2014-02-22 23:36:19 +0300

I ran into this because I installed the openssh package from the NielDK repo on openrepos.net. The package is broken because it does not contain a systemd unit file for sshd. Thus, sshd cannot be started by systemd. What you want to do is downgrade back to the jolla package.

Verify if this applies to you:

# rpm -qa | grep openssh
openssh-6.5p1-5.armv7hl
openssh-clients-6.5p1-5.armv7hl
openssh-server-6.5p1-5.armv7hl

If you get older version numbers, openssh might not be installed from NielDK and you might have some other problem. Use "pkcon repo-list" to check if you actually have the NielDK repo enabled. If you have in fact installed the broken package from NielDK, disable the repo first:

# pkcon repo-disable openrepos-NielDK

Then forcibly erase the three openssh packages installed from there:

# rpm -e --nodeps openssh openssh-clients openssh-server

When you reinstall them now, they're pulled from the official repo, so just do:

# pkcon install openssh openssh-clients openssh-server

Now start sshd via systemd:

# systemctl start sshd.service
edit flag offensive delete publish link more

Comments

I rather do not want to try this since my system runs just fine now (looks like I would have to break it and then fix it, which does not seem wise). I assume the response is the correct one and will close the question.

wcr ( 2014-02-23 00:16:57 +0300 )edit

I can confirm this! Did all like described and sshd service is back with jolla stock openssh version.

I had the NielDK openrepos repository enabled and the openssh packages from there installed (I think they came as update - I cant remeber I did it - so I let the openrepos-NielDK disabled!). I only was able to start the sshd manualy '/usr/sbin/sshd -f /etc/ssh/sshd_config' with some error messages, but the sshd was running after that command. (see a comment from me above). After downgrading back to jolla packages the behavior is as it should be. Thank You

jolladiho ( 2014-02-23 11:57:33 +0300 )edit
1

answered 2014-02-20 21:27:40 +0300

ray-ven gravatar image

same issue - even ssh nemo@localhost from jolla itself won't work - reinstalled openssh and openssh-server - don't know how to start the service manually though

edit flag offensive delete publish link more

Comments

Same problem here. sshd ist not running. Connection refused. I disabled and enabled developer support in settings, but it still do not work.

tried as root: /usr/sbin/sshd -f /etc/ssh/sshd_config answer: Could not load host key: /etc/ssh/ssh_host_ecdsa_key Could not load host key: /etc/ssh/ssh_host_ed25519_key

ls /etc/ssh/*_key shows: ssh_host_dsa_key and ssh_host_rsa_key

how can I get the missing keys back?

I think that is the problem.

jolladiho ( 2014-02-21 17:56:16 +0300 )edit
1

answered 2014-02-22 13:43:29 +0300

wcr gravatar image

Thanks for all those answers.

Indeed, I wanted to connect through the WLAN, as stated above. At the time of that post, developer mode worked on my phone, a password had been set, and I just could not connect, as described.

Later, for no obvious reason, it became impossible to enable developer mode (I tried to debug this, through a separate thread, but nobody offered a solution), so I could not try ssh either any more.

In the end, I did a factory reset yesterday, and now everything works as it should.

This is of course not really satisfactory since I, should this happen again, will have no clue about the origin of the problem. Frequent factory resets do not seem to me a viable solution for these kinds of problems.

A small suspicion I have (but I won't test it, takes too much time) is that the problem actually relates to openssh. After the reset, I did NOT install openssh separately. Somehow, it must be part of the default system already, and maybe the addition install creates inconsistencies?

If someone knew that this is what happened, then we could maybe close the thread.

edit flag offensive delete publish link more

Comments

Seems that the installation is the problem here (as reported in the other answer too) so please edit question title accordingly and close the question cause there are no ssh connection problems in stock Jolla, and specifically from Linux hosts the connectivity has not caused these kinds of problems. Edit: 'seems that the installation of external openssh is the problen here'.

foss4ever ( 2014-02-23 00:07:39 +0300 )edit
0

answered 2014-02-15 17:00:49 +0300

00prometheus gravatar image

Assuming everything else is setup correctly, like firewall, routing, you can ping from the pc, etc, I find that you often must wake up the screen and try several times to get a connection.

Oh, and the user name is 'nemo', and I think the root passwd was inanely defaulted ('admin' or something)

edit flag offensive delete publish link more

Comments

Connection refused means that there is no-one listening port 22 in Jolla, but the Jolla was reached. netstat should show

[root@rsa43 nemo]# netstat -nutpl | grep 22

tcp 0 0 :::22 :::* LISTEN 1/init

rsainio ( 2014-02-15 17:04:33 +0300 )edit

indeed, this shows nothing, but what to do about it? I have read elsewhere that, in sailfish, sshd is not running but triggered into action by the tcp request from outside. However that seems not to happen?

wcr ( 2014-02-15 18:02:13 +0300 )edit

Is ssh activated?

richhanz ( 2014-02-15 18:12:44 +0300 )edit

The only "activation" I could find is in the Developer tools, where I have activated "Remote connection - Allow signing in via SSH" and I have of course set a password there. Is there any other place where I can activate ssh?

wcr ( 2014-02-15 19:20:06 +0300 )edit

Have you tried an USB connection? That rules out WLAN issues.

richhanz ( 2014-02-16 20:06:03 +0300 )edit
0

answered 2014-02-22 12:47:33 +0300

Philippe De Swert gravatar image

First of all, are you sure you are connecting to your pc through USB? Not using wlan?

To make sure you are connecting through USB correctly

  1. Check developer mode is set and remote connection is allowed
  2. Make a note of the ip (default 192.168.2.15, so change this if this is in your normal network range)
  3. Make sure a password is set
  4. If you're on Mac install Horndis
  5. Set up an ip for your USB interface on your pc (It will not get one by default! Well this can be done but is not part of this answer)
  6. connect to your device with ssh nemo@192.168.2.15 (replace the ip by anything you might have set)
edit flag offensive delete publish link more

Comments

I will update my package soon to include the sshd.service unit Until then, please try

systemctl enable sshd.service

systemctl try-restart sshd.service

If this fails, you will need to

/usr/sbin/sshd

after every reboot (until I have updated package) Sorry for this inconvinience

Nieldk ( 2014-02-23 10:42:25 +0300 )edit

Updated ! version -6 is on my openrepos

Nieldk ( 2014-02-23 17:15:18 +0300 )edit
0

answered 2018-03-13 17:53:56 +0300

DarkTuring gravatar image

Doesnt work for me getting the following errors:

tal error: File './core/armv7hl/openssh-7.1p2+

git2-1.9.4.armv7hl.rpm' not found on medium 'htt ps://releases.jolla.com/releases/2.1.4.14/jolla/ armv7hl/'

[nemo@Sailfish ~]$ systemctl start sshd.service Failed to start sshd.service: Interactive authen tication required. [nemo@Sailfish ~]$ systemctl start sshd.service Failed to start sshd.service: Interactive authen tication required. [nemo@Sailfish ~]$ systemctl enable sshd.service Failed to execute operation: Interactive authent ication required. [nemo@Sailfish ~]$ systemctl try-restart sshd.se rvice Failed to try-restart sshd.service: Interactive authentication required. [nemo@Sailfish ~]$ systemctl try-restart sshd.se rvice Failed to try-restart sshd.service: Interactive authentication required. [nemo@Sailfish ~]$ systemctl start sshd.service Failed to start sshd.service: Interactive authen tication required. [nemo@Sailfish ~]$

edit flag offensive delete publish link more

Comments

You need to execute those commands as root. My build should not give any issues atm, I am using my own repo, even thru updates of OS..

Nieldk ( 2018-03-13 19:14:23 +0300 )edit
Login/Signup to Answer

Question tools

Follow
2 followers

Stats

Asked: 2014-02-15 15:35:22 +0300

Seen: 1,932 times

Last updated: Mar 13