ファイルを送信するには:
cat file | ssh example@unixlinux.online "cat > remote"
または:
ssh example@unixlinux.online "cat > remote" < file
ファイルを受け取るには:
ssh example@unixlinux.online "cat remote" > copy
これを試してください:
cat myfile.txt | ssh example@unixlinux.online 'cat - > myfile.txt'
xxd を使用できます 複数のファイルをコピーし、それらに対してコマンドを実行して実行するための醜い引用:
ssh -t example@unixlinux.online "
echo $'"$(cat somefile | xxd -ps)"' | xxd -ps -r > "'somefile'"
chmod +x somefile
echo $'"$(cat someotherfile | xxd -ps)"' | xxd -ps -r > "'someotherfile'"
chmod +x someotherfile
./somefile
./someotherfile
"