Open colemickens opened 1 year ago
cc: @FedericoSchonborn on the off-chance this is also NixOS/sway related.
Not likely related to NixOS on this one.
Be aware that GSConnect/gnome-shell-extension-gsconnect#1203 still applies, until kdeconnect-android
is in a position to update Apache MINA or host key support. There have been some recent updates, but nothing that's been released yet.
But give the workaround from that issue a try, and if it still doesn't work some digging may be required :slightly_smiling_face:
Cracking app and work - thank you so much, I spent a day trying to workout how to install GSConnect on my Librem 5... :laughing:
So, ditto here re browsing - but, I don't think the ref to kdeconnect-android
is relevant to gnome-shell
/ phosh
& Librem 5?
I have service kdeconnect open in firewalld
on both desktop and Librem 5.
Inconsistent multi (double, triple ???) clicking the on the desktop version of Valent's 'Browse File' link threw a pop-up with an 'Open with...' dialogue the same as similar multi-tapping on the same link in Valent on Librem 5, which was:
However, Nautilus does just that - often and well - on both gnome-shell
and phosh
.
(btw, can Valent connect one phone to two accounts on one machine...? I suspect not. In which case, a feature request for a 'Disconnect' button.)
Have you setup an SSHD server to serve file? Valent can't start a server for you, so you'll have to ensure that's running and set the correct port in the device preferences.
(btw, can Valent connect one phone to two accounts on one machine...? I suspect not. In which case, a feature request for a 'Disconnect' button.)
No, but there won't be a disconnect feature either, unfortunately. The only think KDE Connect really does is connect, so best just to quit the program if you want to disconnect.
$ sftp -P 22 purism@phone
Connected to phone.
sftp> ls
Desktop Documents Downloads Music Pictures Public Templates Videos
sftp> put AlienPackages
Uploading AlienPackages to /home/purism/AlienPackages
AlienPackages 100% 14KB 663.2KB/s 00:00
sftp> quit
$ ssh purism@phone
Last login: Tue Apr 11 12:48:21 2023
$ sudo systemctl status sshd
[sudo] password for purism:
● ssh.service - OpenBSD Secure Shell server
Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2023-04-11 12:48:20 BST; 5h 58min ago
Docs: man:sshd(8)
man:sshd_config(5)
Process: 927 ExecStartPre=/usr/sbin/sshd -t (code=exited, status=0/SUCCESS)
Main PID: 935 (sshd)
Tasks: 7 (limit: 3124)
Memory: 11.8M
CPU: 3.294s
CGroup: /system.slice/ssh.service
├─ 935 sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups
├─5423 sshd: purism [priv]
├─5425 sshd: purism@pts/0
├─5426 -bash
├─5448 sudo systemctl status sshd
├─5453 systemctl status sshd
└─5454 less
Apr 11 12:48:20 phone.lan systemd[1]: Starting OpenBSD Secure Shell server...
Apr 11 12:48:20 phone.lan sshd[935]: Server listening on 0.0.0.0 port 22.
Apr 11 12:48:20 phone.lan sshd[935]: Server listening on :: port 22.
Apr 11 12:48:20 phone.lan systemd[1]: Started OpenBSD Secure Shell server.
$
$ sudo systemctl status sshd
[sudo] password for me:
● ssh.service - OpenBSD Secure Shell server
Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2023-04-08 17:44:45 BST; 3 days ago
Docs: man:sshd(8)
man:sshd_config(5)
Process: 1189 ExecStartPre=/usr/sbin/sshd -t (code=exited, status=0/SUCCESS)
Main PID: 1216 (sshd)
Tasks: 1 (limit: 9372)
Memory: 576.0K
CPU: 1.190s
CGroup: /system.slice/ssh.service
└─1216 sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups
Apr 10 23:07:36 mymachine sshd[8861]: Failed password for alogin from 192.168.0.160 port 60028 ssh2
Apr 10 23:07:36 mymachine sshd[8861]: Failed password for alogin from 192.168.0.160 port 60028 ssh2
Apr 10 23:07:36 mymachine sshd[8861]: Connection closed by authenticating user alogin 192.168.0.160 port 60028 [preauth]
Apr 10 23:07:36 mymachine sshd[8854]: Connection closed by invalid user purism 192.168.0.160 port 59986 [preauth]
Apr 10 23:07:37 mymachine sshd[8859]: Connection closed by invalid user purism 192.168.0.160 port 60016 [preauth]
Apr 10 23:54:18 mymachine sshd[10802]: Invalid user purism from 192.168.0.160 port 38104
Apr 10 23:54:18 mymachine sshd[10805]: Failed password for alogin from 192.168.0.160 port 38118 ssh2
Apr 10 23:54:18 mymachine sshd[10805]: Failed password for alogin from 192.168.0.160 port 38118 ssh2
Apr 10 23:54:18 mymachine sshd[10805]: Connection closed by authenticating user alogin 192.168.0.160 port 38118 [preauth]
Apr 10 23:54:19 mymachine sshd[10802]: Connection closed by invalid user purism 192.168.0.160 port 38104 [preauth]
$
Are the ports okay?
Is it configured?
EDIT: ah it looks like authentication just isn't supported here yet. On my devices I've already ssh-copy-id
and there's no user conflict like here. See #435 for tracking this issue.
I've configured keyed login in both directions and banned anything else on the phone. When I checked the config on the laptop the port was set to 19 - which I'd noticed before and changed to 22 - but, changing it again has made no difference. The phone is set to 22 as expected.
I thought it might be worth mentioning that Nautilus has no difficulty mounting the phone via sftp
on its own:
There you've put in the username purism
, which Valent won't know about. Like it's trying to connect as current_user@localhost
.
Thanks @andyholmes - I guess I figured that stuff would be communicated through the pairing process or something.
EDIT: ah it looks like authentication just isn't supported here yet. On my devices I've already ssh-copy-id and there's no ussh-copy-id -i $HOME/.ssh/id_rsa.pub purism@morgansphone.lanser conflict like here.
That's what I did when I got the phone:
ssh-copy-id -i $HOME/.ssh/id_rsa.pub purism@morgansphone.lan
But, I see I've only done it the other way for my backup servers, not the machine (morgansmachine.lan
) I'm running Valent from - but then again, I've only attempted to brows files from morgansmachine.lan
and not the other way round anyway. And, this is only going to work in my local network (known network) or I'm going to get an ssh
authenticity challenges on every new network? Is current_user@localhost
the user you did ssh-copy-id
from?
Is
current_user@localhost
the user you didssh-copy-id
from?
Well, just so we're clear I can use real names :) I've done ssh-copy-id
from andrew@ideapad
to user@oneplus6
, and from user@oneplus6
to andrew@ideapad
.
I've just checked the sftp
plugin and it does indeed send the local user, so I guess it does have to be done both ways. Technically the user
/password
have been deprecated, but it may try to use the user
field if the host is unknown.
(btw, can Valent connect one phone to two accounts on one machine...? I suspect not. In which case, a feature request for a 'Disconnect' button.)
FWIW, this particular case has changed. It is possible to run more than one instance of Valent on a machine, as long as they have different D-Bus sessions.
If there is an update, it will be here.
I noticed that a new version of the KDE Connect app (v1.32.1) was released a few hours ago. It seems to include the latest versions of sshd (2.13.2) and Apache MINA (2.2.3), so it looks like this issue in Valent might now be fixable.
What needs to be fixed in Valent?
Currently, if you mount your paired phone, clicking on its IP address in the left sidebar in Nautilus presents a "This location could not be displayed" permission error. You have to manually add "/sdcard" or "/storage/emulated/0" after the phone's IP address in Nautilus's path bar to view the phone's filesystem. I've posted more about this issue in the relevant Github issue in the GSConnect repo, which has the same issue as Valent: https://github.com/GSConnect/gnome-shell-extension-gsconnect/issues/1203#issuecomment-2297455943
According to the linked thread (if I understood correctly) it seems that the KDE Connect Android app didn't expose the correct path names (to where the data is visible on the phone's file system) due to it being packaged with outdated versions of the sshd and Apache MINA libraries that didn't support doing that.
However, now that the Android app has been updated recently with these updated libraries, it should be possible for Valent to read the correct path names. If it's implemented correctly, that should allow Valent to point to the right path on the phone, so that clicking on it in the Nautilus sidebar would show the full filesystem of the phone without a permission error.
Current Behavior
Sorry, I'm not sure how to troubleshoot/provide a good report here.
Most features seem to work, but even after assigning
valent
a directory on my Pixel 6A, it seems to not do anything when I hit Browse Files (invalent
).It shows "primary:ValentShared" in the "Filesystem expose" plugin settings on the phone.
Expected Behavior
I'm able to browse the "ValentShared" directory I created and gave KDE Connect (on Android) permission to.
Desktop
Other (please specify)
Other Desktop
sway
Operating System
nixos (nixos-unstable)
Installed from
Other
Version
1.0.0.alpha
Devices
KDE Connect (Android)
Plugins
No response
Logs
Screenshots
No response