useful commands

All posts tagged useful commands

Copying one file and appending that file to a file on a remote host on one line.  

cat filename | ssh hostname “cat >> filename”
A simple example of this might be like your ssh keys, but even a simpler approach for that would by ssh-copy-id command, but just trying to demonstrate an example here..  =)  
cat ~/.ssh/id_dsa.pub | ssh remotehost “cat >> ~/.ssh/authorized_keys”