Hello dear emacs maintainers,

If the local used shell does not exist on the remote the shell-command-to-string function from simple.el does not work as expected. The reason for this is that the variable shell-file-name is wrong and therefore one only gets a string saying that the shell does not exist.
Changing the function to 
(defun shell-command-to-string (command)
  "Execute shell command COMMAND and return its output as a string."
  (with-output-to-string
    (with-current-buffer
      standard-output
      (let ((shell-file-name
              (with-temp-buffer
               (apply #'process-file "printenv" nil t nil '("SHELL"))
               (string-trim-right (buffer-string)))))
        (process-file shell-file-name nil t nil shell-command-switch command)))))
does work for remotes that do not have the local shell, too.
I hope this is the right place for this and additionally wanted to thank you for maintaining emacs.

Best regards,
Benedikt Tissot