Ticket #3835 (new defect)

Opened 7 years ago

Last modified 7 years ago

Cannot ssh to Android when running sshd

Reported by: gnusupport Owned by:
Priority: major Milestone: Future Releases
Component: mc-vfs Version: 4.8.18
Keywords: ssh Cc:
Blocked By: Blocking:
Branch state: no branch Votes for changeset:

Description

I am using on Android the termux applications from F-droid.org and sshd daemon works well when accessed from computer by using ssh command.

By using Midnight Command, I get error in version 4.8.18. and I cannot login, the error is "cannot chdir to "/sh://android:8022"

I guess this is happening due to sshd running without password. Yet it would be excellent to have it in mc.

Change History

comment:1 Changed 7 years ago by andrew_b

  • Component changed from mc-core to mc-vfs

comment:2 Changed 7 years ago by zaytsev

FISH doesn't support password authenticated connections for now (even if password is an empty string). You have to setup public key auth. Please confirm that it works with public keys, and then I will close this bug.

comment:3 Changed 7 years ago by gnusupport

In contrary, there is no password authentication on Android, I am using the public key authentication.

I cannot login by using latest mc version from git, and none of those earlier.

comment:4 Changed 7 years ago by gnusupport

When I said "without password" it meant that there was no login on Android, it just uses public key authentication.

I am on computer, and I cannot login with mc and fish to Android.

If I am to establish ssh connection from console, bash, that works just fine.

comment:5 Changed 7 years ago by gnusupport

To replicate is easy:

  1. Take Android phone
  1. Go to F-droid.org, install F-droid
  1. Update repositories
  1. Install termux tools applications
  1. Within termux, install sshd, pkg install openssh
  1. Try logging to port 8022 from console, it works.
  1. Try logging through fish in mc, it does not work for unknown reason.

comment:6 Changed 7 years ago by zaytsev

Ok, then it sounds like a problem with FISH scripts & your ssh server / userland. Maybe your ls doesn't support formats that mc is able to parse, but at the same time you don't have perl to fallback to, or something like that. You can try to change 0 to 1 here and recompile:

https://github.com/MidnightCommander/mc/blob/master/src/vfs/fish/fish.c#L686

This will write a log of what's going on when you connect to the server. From there you can try to understand what is not working correctly.

Unfortunately, it's almost impossible to help you without being able to reproduce the issue, but even if I were able to do so, I can't make time to write a patch for it myself. Your steps are useful, but the per-requisite is to have the phone in the first place and time to invest into fixing the problem.

Maybe if termux has useful packages for perl it would be easiest for you to install perl, and if the problem is indeed due to userland, this will "fix" it.

comment:7 Changed 7 years ago by gnusupport

I have changed 0 to 1 and I do not get any debug information in /tmp

To reproduce is not longer than 5 minutes provided you have Android phone that can run Termux (terminal) application.

comment:8 Changed 7 years ago by zaytsev

To reproduce is not longer than 5 minutes provided you have Android phone

Right, provided that I have an Android phone, which is not the case, and also have a few hours subsequent to 5 minutes to fix it after I've reproduced it. In the mean time, I've suggested a workaround which might work for you.

Note: See TracTickets for help on using tickets.