I'm trying to run a script on a remote machine with ssh and receive the result, I tried:
sh -c "ssh 192.168.2.202 /etc/my_script.sh arg1 arg2 > result.txt 2>/dev/null "
as suggested in this answer Redirect stdout over ssh but if I don't redirect STDERR I get:
shell-init: error retrieving current directory: getcwd: cannot access parent directories: Inappropriate ioctl for device
Is there a better way ? In the end I need to run ssh from inside a program - by system call and be able to receive the result in a file or a variable Note: connecting to a uProcessor that has a skinny linux ubunto loaded with dropbear ssh