can't get file transfer working. Help, please!
#11
I'm not at all familiar with easyssh. Normally for sshd (that is, ssh server) the config file is /etc/ssh/sshd_config. To enable password authentication you would enable the following line and restart sshd or send it the NOHUP signal to re-read its config:

Code:
PasswordAuthentication yes

If needed you can specify an alternate configuration for the ssh client on the desktop using the "-F configfile" option. From the ssh man page:

Code:
     -F configfile
             Specifies an alternative per-user configuration file.  If a con‐
             figuration file is given on the command line, the system-wide
             configuration file (/etc/ssh/ssh_config) will be ignored.  The
             default for the per-user configuration file is ~/.ssh/config.

Which direction are you trying to make the connection, desktop-->pinephone or pinephone-->desktop?
  Reply
#12
So... I was working great... until I decided to have fun installing the latest postmarketOS version...

Now I can mount the directory, but I cannot copy file or even unmount :

fusermount -u /tmp/mnt returns
fusermount: entry for /tmp/mnt not found in /etc/mtab

Trying to unmount on the PC says : Operation not permitted

Note that :
sshfs pinephone@ip:/home/user /tmp/mnt returns
read: Connection reset by peer

sudo sshfs pinephone@ip:/home/user /tmp/mnt makes mnt in /temp an unknown type file

sudo sshfs -o allow_other pinephone@ip:/home/user /tmp/mnt do the job and I can explore the phone's content, but not copy to nor unmount...

I guess i'm missing something about permissions here...
  Reply
#13
Koikilensoi Wrote:So... I was working great... until I decided to have fun installing the latest postmarketOS version...

Now I can mount the directory, but I cannot copy file or even unmount :

fusermount -u /tmp/mnt returns
fusermount: entry for /tmp/mnt not found in /etc/mtab

Trying to unmount on the PC says : Operation not permitted

Note that :
sshfs pinephone@ip:/home/user /tmp/mnt returns
read: Connection reset by peer

sudo sshfs pinephone@ip:/home/user /tmp/mnt makes mnt in /temp an unknown type file

sudo sshfs -o allow_other pinephone@ip:/home/user /tmp/mnt do the job and I can explore the phone's content, but not copy to nor unmount...

I guess i'm missing something about permissions here...

I have not tried postmarketOS so am not familiar with any issues that may have. I think the first thing to do is to back up a bit and make sure you can ssh into your Pinephone. If ssh doesn't work then there's an issue with that which must be resolved before sshfs will work. Once you have ssh working properly you can work with sshfs.

On the PC/laptop side you should not be usining sudo to run sshfs, it is not needed if you have read/write access to the mount point. You would have the proper permissions if you "mkdir /tmp/mnt" from a non-root command shell, or create it using a file manager running in your account. Make sure the account you're logging into on the Pinephone side has permission to access what you need on the phone.
  Reply
#14
If I recall correctly, postmarketOS creates an additional user if you choose to enable SSH at install time. That user does not have write permission to /home/user (default user's home directory).
If you want to mount /home/user on your PC, you have to login as "user".
Code:
sshfs user@ip:/home/user /tmp/mnt

Regarding the security, disabling password authentication is enough for most cases.

Run this on your PC:
Code:
ssh-keygen && ssh-copy-id user@ip
Then edit /etc/ssh/sshd_config on your phone and restart ssh.service

https://wiki.mobian-project.org/doku.php...f-password
  Reply
#15
(05-18-2021, 07:55 AM)Zebulon Walton Wrote: If ssh doesn't work then there's an issue with that which must be resolved before sshfs will work. Once you have ssh working properly you can work with sshfs.

On the PC/laptop side you should not be usining sudo to run sshfs, it is not needed if you have read/write access to the mount point. You would have the proper permissions if you "mkdir /tmp/mnt" from a non-root command shell, or create it using a file manager running in your account. Make sure the account you're logging  into on the Pinephone side has permission to access what you need on the phone.

Thanks again, that was useful.

So... Trying to ssh, I realized that I had a wrong key in /.ssh/known_hosts, probably because it was from the phone's previous OS.
I've deleted it and by ssh again, the new one was added to list of known hosts. And ssh worked fine.

Then I managed to sshfs (without sudo) and it worked fine. I see the phone folder mounted and I can unmount it.

BUT I stil cannot copy files to the phone (still says permission denied).

To be continued...

(05-18-2021, 09:32 AM)awaittrot Wrote: If I recall correctly, postmarketOS creates an additional user if you choose to enable SSH at install time. 

Indeed, that's what I've done.


(05-18-2021, 09:32 AM)awaittrot Wrote: That user does not have write permission to /home/user (default user's home directory).

If you want to mount /home/user on your PC, you have to login as "user".

That would make sense then.

I tried
Code:
sshfs user@ip:/home/user /tmp/mnt
but got Connection reset by peer

Then trying to simply ssh to user@ip, I get Permission denied (publickey,keyboard-interactive).

Don't know if your last bit of code would solved that, haven't tried yet
  Reply
#16
(05-18-2021, 10:00 AM)Koikilensoi Wrote: I tried
Code:
sshfs user@ip:/home/user /tmp/mnt
but got Connection reset by peer

Then trying to simply ssh to user@ip, I get Permission denied (publickey,keyboard-interactive).

Don't know if your last bit of code would solved that, haven't tried yet

It looks like password authentication for default user is disabled in pmOS, so this has to be enabled first. Instructions can be found at pmOS wiki.
https://wiki.postmarketos.org/wiki/SSH#First_login
  Reply
#17
(05-18-2021, 11:40 AM)awaittrot Wrote: It looks like password authentication for default user is disabled in pmOS, so this has to be enabled first. Instructions can be found at pmOS wiki.
https://wiki.postmarketos.org/wiki/SSH#First_login

Yep, that was it! Thx!

So now I "just" need to set up a Key-Based Authentication and a proper firewall...
  Reply
#18
Thanks to all of you helping! It ought to be working based on what you're saying here and what I see elsewhere on the web. (I'm looking *everywhere*). I edited my user ssh_config, system-wide ssh-config and sshd_config in /etc/ssh/. Set "PasswordAuthentication yes" everywhere.

The error messages change a bit, but the message is always the same. Authentication failure or host unknown. My ssh is borked. Is there really no. other. way. to transfer files? 

If I ping the local IP of the pinephone, 10.66.0.82, it's right there. So the hardware is seeing it. There's just nothing that will let me connect.

One thing that occurred to me is that I'm still using stock mobian on the pinephone, so it's just got the 1234 password. Does ssh maybe block stupidly simple passwords??

I was briefly trying pinephone -> desktop. Since that didn't work, I'm back to desktop -> pinephone.

The thing that makes me crazy is I really don't want to troubleshoot ssh. I just need to transfer files. Single user environment. Zero security issues. This is reminding me of the Good Old Days when it was faster and easier to carry a floppy between buildings and transfer files using sneakernet than the miserable protocols available on ethernet. I'm going to take the sd card out and just put the files on it. But, man, I do hate to admit defeat like that.

All suggestions, if anyone has some, gratefully accepted!
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
OS: Mobian Bookworm, Phosh. Pinephone Braveheart from 2020-02-11
  Reply
#19
My next choice if sshfs won't work would be probably be to set up ftp. Other options would include installing Samba for Windows networking, or if you're connecting from a Unix/Linux system you could use NFS. With anything that exposes your files to the network you would want to protect it with a firewall or run it only when needed.

I actually consider sshfs to be the simplest because if you have ssh working sshfs will work as well, nothing more to set up, and I always have ssh going on the Linux systems I work with. (The numerical password works fine with ssh by the way, used it that way on the Pinephone before setting up key-based login.)

Actually if I want to transfer a lot of files or very large files I'll sometimes take the SD card out and plug it into my desktop computer. It's a lot faster than copying them over the network.
  Reply
#20
Hello quixote,







i just tried Desktop => Mobian (unstable) again:







ssh:





   









FileZilla:





FileZilla-Settings:





   









FileZilla final:



   







You get a two Way Connection with...





Maybe you have "overconfigurated" your Pinephone and should start from a new Flash ;-).






Yours



Sancho Panza ;-)
PS: Shitty Editor here :-(
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Calls 4G not working oliwierzgorniak 2 1,973 08-06-2024, 02:20 PM
Last Post: baptx
  Mobile internet via cellular network mostly not working Anna 18 13,254 01-19-2024, 02:59 AM
Last Post: anonymous
Exclamation The internal speaker stops working anonymous 6 2,448 01-17-2024, 05:53 PM
Last Post: anonymous
  APN settings not working with new operator SIM card user641 1 1,365 03-01-2023, 04:43 PM
Last Post: anonymous
  Possible Solution for Microphone Not Working Ferriah 0 1,179 02-13-2023, 01:09 PM
Last Post: Ferriah
  Squeekboard stopped working Zebulon Walton 2 1,591 11-24-2022, 08:41 PM
Last Post: Zebulon Walton
  suspend inhibit no longer working jsch 3 2,575 10-23-2022, 09:20 AM
Last Post: LibrePhoneUser
  low disk space on file system root revisited benedikt55 2 2,007 09-24-2022, 10:16 AM
Last Post: benedikt55
  Rescue Your Mobian post Update Aug22 faster fix to working guide biketool 9 6,406 09-05-2022, 12:10 AM
Last Post: biketool
  How to get Pinetime working with Pinephone arkadione 12 9,279 08-28-2022, 12:30 PM
Last Post: Fish

Forum Jump:


Users browsing this thread: 1 Guest(s)