Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automate All The Things: Android and SSH #3

Open
atextor opened this issue May 20, 2018 · 6 comments

Comments

Projects
None yet
2 participants
@atextor
Copy link
Owner

commented May 20, 2018

Please leave your comments for Automate All The Things: Android and SSH here.

@francwalter

This comment has been minimized.

Copy link

commented Dec 5, 2018

I use the SSH Plugin paid since long, but I am not happy with its (nearly not existing) error handling.
I wonder if it's not possible to directly use the command line for ssh (as Run Shell Action) in Tasker to replace the plugin which is since long not anymore developed.
Possible?

@atextor

This comment has been minimized.

Copy link
Owner Author

commented Dec 5, 2018

In principle that should work, but requires the phone to be rooted, which I can't do with mine. If you try it, I'd be happy to hear about your results.

@francwalter

This comment has been minimized.

Copy link

commented Dec 11, 2018

But there is natively no ssh command on Android, at least not at Android 7.0
With the command ssh in the Terminal as root (su) I get a:

/system/bin/sh: ssh: not found

So I assume the ssh-libraries are just missing in Android. That is why it is apps or plugins (as SSH Plugin paid) needed.

EDIT: I just found old tests with my former phone (SGS4) where I indeed could do it. There was ssh on the command line, it was CM or Lineage something.
I did there:
ssh -i /path/to/key/on/system/drive/key -T username@192.168.0.120
where the key had to be on the system path (/data/) because ssh rejects the key not having 600 as file permission, which is not possible on the sd-card (with fat32/extfat).
That worked indeed!

@atextor

This comment has been minimized.

Copy link
Owner Author

commented Dec 12, 2018

I see. Technically, it should still be possible to install a ssh binary also on newer Androids, if you have root access, right? Of course this would have to be built to run there (e.g. with the correct library dependencies or static binary).

@francwalter

This comment has been minimized.

Copy link

commented Dec 12, 2018

I tried with Termux, where I can install packages with pkg:
pkg install openssh
but there (after install without error) I get that error, when I try ssh:
ssh CANNOT LINK EXECUTABLE "ssh": library "libcrypto.so.1.1" not found
No help in this special case, I didn't find anything about that with the same issue (on Android).
I asked Termux developer but till yet no answer...
No success neither with dropbear (which is also available in Termux pkg, but throws errors on install already because same missing lib).

EDIT: after:
pkg upgrade
the install of openssh did work in Termux!
Will test later if the Termux's openssh is usable in Tasker...

@francwalter

This comment has been minimized.

Copy link

commented Dec 17, 2018

In Tasker it did not work, got errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.