Saturday, December 13, 2008

stupid nix trix: simple stupid ssh piping

I am going to start a feature called stupid nix trix, that will be one liner helpful commands that you can do on *nix ( unix, linux, mac ) machines.

So let's say you have a file on your home nix machine and you need it on your server, well if ssh is enabled on that server you don't need to break open filezilla just to sftp that file across, you can do it in one line:

cat /orignalDir/filename | ssh usernameforserver@server.tld "cat > /destinationDir/filename"

Real World:
cat $HOME/.ssh/ | ssh "cat > /tmp/"

No comments: