do you have the hdfs client installed on the remote machine and it has access via network to your cluster nodes? If yes all you need is
hdfs dfs -put localfile hdfs://nn.example.com/hadoop/hadoopfile
or
hdfs dfs -copyFromLocal
localfile hdfs://nn.example.com/hadoop/hadoopfile
Otherwise you have typically an edge node, where you first transfer the file to in a local file system (via scp or ftp etc.) and then use the hdfs command to put the file to hdfs on the edge node.