The Following 5 Users Say Thank You to Feathers McGraw For This Useful Post: | ||
![]() |
2016-02-14
, 18:59
|
|
Posts: 115 |
Thanked: 185 times |
Joined on Apr 2011
@ Spain
|
#2
|
![]() |
2016-02-14
, 19:38
|
|
Posts: 435 |
Thanked: 684 times |
Joined on Apr 2012
@ Netherlands 020
|
#3
|
![]() |
2016-02-14
, 20:32
|
|
Posts: 654 |
Thanked: 2,368 times |
Joined on Jul 2014
@ UK
|
#4
|
III: My 3G provider, Yoigo (Telia Sonera) gives IPs behind a CGNAT. So the SSH daemon is not accesible to the whole world. Of course, there are these WhatsApp teenagers behind the same CGNAT as me, but I don't expect them to know what SSH means.
IV: The same thing with public wifi's at restaurants, transport and the like.
V: Get root access in 30 seconds? Could you post a link to this bug?
VI: I don't know why, but I'm unable to set RSA key authentication on my Jolla. I've got three of four Debian machines, my Raspbian RPi and an OpenWRT router, all of them sharing their respective RSA keys: they work flawlessly. But when it's time to log into my Jolla this way, "Permission denied (publickey)".
sam@T440s:~$ ssh-copy-id nemo@192.168.1.227 /usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed /usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys nemo@192.168.1.227's password: Number of key(s) added: 1 Now try logging into the machine, with: "ssh 'nemo@192.168.1.227'" and check to make sure that only the key(s) you wanted were added. sam@T440s:~$ ssh nemo@192.168.1.227 Enter passphrase for key '/home/sam/.ssh/id_rsa': Last login: Sun Feb 14 20:22:17 2016 from 192.168.1.112 ,--- | SailfishOS 2.0.1.7 (Taalojärvi) (armv7hl) '---
![]() |
2016-02-14
, 21:34
|
|
Posts: 435 |
Thanked: 684 times |
Joined on Apr 2012
@ Netherlands 020
|
#5
|
The Following User Says Thank You to jellyroll For This Useful Post: | ||
![]() |
2016-02-14
, 22:32
|
|
Posts: 6,450 |
Thanked: 20,983 times |
Joined on Sep 2012
@ UK
|
#6
|
- pick up a jolla
- enable developer mode
- toggle remote connection and set whatever password you like, without having to know the current password
- open fingerterm
- use devel-su with the password you just set to run commands as root
The Following 4 Users Say Thank You to pichlo For This Useful Post: | ||
![]() |
2016-02-14
, 23:31
|
|
Posts: 654 |
Thanked: 2,368 times |
Joined on Jul 2014
@ UK
|
#7
|
If you were as security conscious as your posts suggest, you would have a step between 1 and 2:
- guess the unlock code
Why worry about the root access anyway? All the important stuff is in the user land: your files, your contacts, your login creds to various services...
the possibility to install stuff...irrelevant on Jolla.
![]() |
2016-02-14
, 23:50
|
Posts: 290 |
Thanked: 385 times |
Joined on Jan 2012
@ Madrid, Spain
|
#8
|
-A INPUT -i gprs0 -p tcp -m tcp --dport 22 -j DROP
The Following 2 Users Say Thank You to pasko For This Useful Post: | ||
![]() |
2016-02-15
, 07:06
|
|
Posts: 435 |
Thanked: 684 times |
Joined on Apr 2012
@ Netherlands 020
|
#9
|
I don't like leaving SSHD running on my phone, because it leaves the phone vulnerable to brute-force password attacks against SSH when on mobile networks and public wifi. I'd never leave a server like that, so I'm definitely not going to do that on my phone
#!/bin/sh tail -fn0 /var/log/auth.log | \ while read line ; do echo "$line" | grep "Failed password" if [ $? = 0 ] then iptables -A PREROUTING -t nat -i wlan0 -p tcp --dport 22220 -j REDIRECT --to-port 2222 iptables -A PREROUTING -t nat -i gprs0 -p tcp --dport 22220 -j REDIRECT --to-port 2222 /etc/init.d/ssh stop dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteDialog string:"Visitors." uint32:0 string:"OK" mplayer /home/user/Alert.mp3 fi done
The Following 3 Users Say Thank You to jellyroll For This Useful Post: | ||
![]() |
2016-02-15
, 09:36
|
|
Posts: 654 |
Thanked: 2,368 times |
Joined on Jul 2014
@ UK
|
#10
|
The Following User Says Thank You to Feathers McGraw For This Useful Post: | ||
![]() |
Tags |
devel-su, jolla, root access, sailfish, ssh daemon |
|
I've been frustrated a few times to find that nemo's PW is reset when the GUI option to enable or disable remote access is toggled. Even if you don't enter anything in the new PW box or click "generate", enabling or disabling SSHD will wipe the existing PW. Grr!
I did some experimenting... this is with SSHD enabled:
The whole thing is quite irritating really, because you can't easily control the two settings independently of each other in the GUI, AND the device is very insecure - it would literally take someone 30s to get root access.
I've been trying to think of a decent way to separate the two, but I don't think there's an obvious perfect solution. Here's my thoughts on workarounds with the current setup:
You can set a password for nemo using the utility passwd, which will enable you to use devel-su in fingerterm without SSHD, but enabling SSHD in the GUI will still clobber your PW.
I guess you can also manually change SSHD to allow publickey authentication only, but I'm not sure if the GUI setting will clobber this too. This also doesn't solve the problem that someone can pick up your device and root it in 30s.
If I could go back in time and whisper in the Jolla devs' ears as they were designing the system, here's how I'd suggest setting it up:
Two questions for the rest of you:
Hopefully I'm not the only one irritated by this