# to remote host cat localfile.conf | ssh user@hostname 'cat -> /tmp/remotefile.conf' # from remote host ssh user@hostname 'cat /tmp/remotefile.conf' > /tmp/localfile.conf