We have moved to a new Sailfish OS Forum. Please start new discussions there.
2

ssh connection refused [answered]

asked 2015-03-12 11:03:20 +0200

objectifnul gravatar image

updated 2015-03-15 08:49:13 +0200

Hi, my Jolla (Yliaavanlampi) suddenly refuses ssh connection. I already read both closed topics on this issue. su-devel on, developer mode on. Tried over usb and wifi. Trying systemctl start sshd.service fails. systemctl status sshd.service displays "inactive (dead)" and "failed (Result:start-limit) ... (code=exited, status=255). Difficult to clipboard terminal contents accurately, of course.

Any new hint?

edit retag flag offensive reopen delete

The question has been closed for the following reason "the question is answered, an answer was accepted" by objectifnul
close date 2015-03-14 16:40:24.408004

Comments

For me it is working good. However systemctl status sshd says the following:

sshd.service - OpenSSH server daemon
   Loaded: loaded (/lib/systemd/system/sshd.service; disabled)
   Active: inactive (dead)

but it doesn't say anything like failed ....

Have you recently disabled and re-enabled remote access? I just figured out that the system forgets the password if you do this, so you have to set it new. I don't know if this is a bug or a feature.

wanderer ( 2015-03-12 11:42:05 +0200 )edit

Didn't disable remote access, unless OS update did it. Anyway I checked: it's enabled. Just to make sure, I also re-entered nemo plus root passwords ('passwd root'). PC Suite mode is OK. When trying to establish SSH connection, Putty says "Server unexpectedly closed network connection".

objectifnul ( 2015-03-12 14:00:09 +0200 )edit

Now when I execute systemctl start sshd.service I have no confirmation and no error. SSH connection still refused with a different message: "Network error. Connection refused". Clipboard copy of the response to systemctl status sshd.service:

,---
| SailfishOS 1.1.2.16 (Yliaavanlampi) (armv7hl)
'---
[nemo@Jolla ~]$ devel-su
Password:
[root@Jolla nemo]# systemctl start sshd.service
[root@Jolla nemo]# systemctl status sshd.service
sshd.service - OpenSSH server daemon
Loaded: loaded (/lib/systemd/system/sshd.service; disabl
ed)
Active: failed (Result: start-limit) since jeu. 2015-03-
12 13:23:55 CET; 1min 20s ago
Process: 4736 ExecStart=/usr/sbin/sshd -D $SSHD_PARAMETER
S (code=exited, status=255)
Process: 4733 ExecStartPre=/bin/bash -c if [ \( ! -s /etc
/ssh/ssh_host_dsa_key \) -a \( ! -s /etc/ssh/ssh_host_dsa_k
ey.pub \) -a \( ! -s /etc/ssh/ssh_host_rsa_key \) -a \( ! -
s /etc/ssh/ssh_host_rsa_key.pub \) ]; then /usr/sbin/sshd-h
ostkeys; fi (code=exited, status=0/SUCCESS)
Main PID: 4736 (code=exited, status=255)

mars 12 13:23:54 Jolla systemd[1]: Unit sshd.service ent...
mars 12 13:23:55 Jolla systemd[1]: sshd.service holdoff ...
mars 12 13:23:55 Jolla systemd[1]: sshd.service start re...
mars 12 13:23:55 Jolla systemd[1]: Unit sshd.service ent...
Hint: Some lines were ellipsized, use -l to show in full.
[root@Jolla nemo]#
objectifnul ( 2015-03-12 14:21:51 +0200 )edit

I'm using latest openssh and openssl from openrepos since nieldk compiled them and I had this 'connection refused' issue after ever single firmwareupdate. Everytime openssh and ssl packages were downgraded to old sailfish version 5.6p1 and I couldn't connect anymore.

I then always had to reinstall latest openssh/ssl packages manually to get my connection back.

You can check your version by entering 'ssh -V' in terminal. By the way do you use keys for authenticating the connection? I think the key files are actually the root cause for the connection blocking.

J4ZZ ( 2015-03-12 14:38:05 +0200 )edit

@objectifnul: So you have set a root password with passwd root? I think this could cause problems, because it is not the standard way for root access in Sailfish OS. By default root has no password set and is not accessible directly (e.g. via su). Root access is gained indirectly via devel-su and the Password you set in the developer mode settings. I don't know if this is related to this problems, it's just a guess.

wanderer ( 2015-03-12 15:11:47 +0200 )edit

1 Answer

Sort by » oldest newest most voted
1

answered 2015-03-12 15:44:15 +0200

objectifnul gravatar image

updated 2015-03-14 16:39:28 +0200

Okay, I uninstalled Openrepos' openssl & openssh. This seems to reinstall Jolla genuine components instead (see here).

,---
| SailfishOS 1.1.2.16 (Yliaavanlampi) (armv7hl)
'---
[nemo@Jolla ~]$ ssh -V
OpenSSH_5.6p1, OpenSSL 1.0.1j-fips 15 Oct 2014

Now SSH connection is back, provided I confirm after this warning (maybe due to Kerberos): image description

For non-French speaking readers, "oui" means "yes", "non" means "no", "annuler" means "cancel" ;-)

By the way, lynx was also removed automatically during the uninstall process.

edit flag offensive delete publish link more

Comments

After pkcon update:

 Command ssh -V starting...
 OpenSSH_6.7p1, OpenSSL 1.0.2 22 Jan 2015
 Program returned exit code 0
objectifnul ( 2015-03-12 17:23:03 +0200 )edit

It would be interesting to know what actually caused the problem.

lakutalo ( 2015-03-14 16:56:22 +0200 )edit

@lakutalo Probably because of Openrepos' OpenSSH I had installed, perhaps obsolete and broken for sure. Use genuine Jolla version instead, or maybe update to NielDK's version 6.7.p1 in Openrepos. See here.

objectifnul ( 2015-03-14 19:50:02 +0200 )edit

Question tools

Follow
1 follower

Stats

Asked: 2015-03-12 11:03:20 +0200

Seen: 1,216 times

Last updated: Mar 14 '15