socat als Argument für ssh: "bash: socat: Befehl nicht gefunden"

1899
Daniel

Wenn ich von einer Linux-Box in eine OSX-Box ssh, funktioniert das Ausgeben von Socat einwandfrei. Wenn ich jedoch den Befehl socat als Argument an ssh weitergebe, schlägt dies fehl. socatwurde in osx mit installiert brew. Irgendeine Idee, warum das passiert?

This works: $ ssh daniel@remoteOSX $ socat -d -d SYSTEM:date - < date shows up here :) >  This fails: $ ssh daniel@remoteOSX 'socat -d -d SYSTEM:date -' Password: bash: socat: command not found <-- The ERROR 
0

1 Antwort auf die Frage

1
glenn jackman

Offensichtlich wird Ihr PFAD sshnicht verwendet . Erstellen Sie Ihre Umgebung neu, indem Sie eine Login-Shell starten.

ssh daniel@remoteOSX 'bash -lc "socat -d -d SYSTEM:date -"'