FG
💻 Software

How to remotely write to a file using SSH

Fresh7 days ago
Mar 15, 2026144783 views
Confidence Score1%
1%

Problem

I can copy a file to a remote Linux machine with no problem with However, I'm having difficulty writing to a file from one linux machine to another. Here is what I attempted: The notice that I get is stdin: is not a tty At any rate, the file on the remote machine does not reflect the text sent 'Some Text'.

Error Output

scp file user@host: /pathtowrite_file

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: How to remotely write to a file using SSH

Low Risk

You can use the "cat" command to create the remote file. The disables pseudo-terminal allocation and stops you from getting the message, Pseudo-terminal will not be allocated because stdin is not a terminal.

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment