Skip to content

Tag: ssh

SSH and exec channels with python shell

We have implemented a python shell for our hardware devices that solely consists of the python cmd module on embedded linux. Our (non-root) user’s shell is set to the path of this python shell in /etc/passwd and /etc/shadow. Code example below: Previously, one of our clients had used SSH.NET to issue co…

How to have simple and double quotes in a scripted ssh command

I am writing a small bash script and want to execute the following command via ssh Unfortunately this command contains both simple and double quotes so I can’t do What would be the recommended way to solve this issue ? Answer Using a heredoc You can just pass your exact code on the shell’s stdin: …