Can you provide further input after running one script over SSH in iOS I have a Linux server that can be accessed through SSH.
I'm using the iOS shortcuts app to try and run scripts over SSH. If I try to do a Linux command like sudo apt-get install package, the shortcuts app returns no output from the server. However, if I run a command from my phone that doesn't require elevated permissions (like ifconfig), it does return the output.
I assume that when I try to run sudo commands from my phone via the shortcuts app, the reason nothing is being returned is because it requires the password (because those commands require elevated permissions), however the shortcut ends as soon as nothing is returned from the SSH server.
I've tested the same SSH server on different computers, and it all works fine, so I think it's something I need to add additionally for the shortcut on my iPhone to work.
So my question is - Is it possible to then enter the password fro a command like sudo apt-get, etc so then the script can continue to run as normal?
No, you can't enter a password. The only thing that I can think of is adding the commands you want to be able to run to the sudoers file.
I'm not sure how to works in Linux but on macOS you put a file in /etc/sudoers.d/something using the visudo command.
There seems to be an example page for Linux here: https://phoenixnap.com/kb/linux-sudo-command that might be useful as a starting point.