All Distros, Packages

Transfer files using SSH

The most used method to transfer files among servers is scp. However, an alternative method is by piping cat and ssh.

From your local machine, you want to send “telnet” to “hostname7.site.com“.

Issue:

# cat telnet-0.17-59.el7.ppc64.rpm | ssh root@hostname7.site.com "cat - > /root/telnet-0.17-59.el7.ppc64.rpm"
It's magic!
Cheers!
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s