I have 2 machine machine1 and machine2.
I want to write from write some contents into file in machine2 from machine1.
In a same machine I can run
sudo cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys to write the contents of
But I want to contents of
~/.ssh/id_dsa.pub machine1 into
~/.ssh/authorized_keys file in machine2. I can do ssh and do this.
Since I'm installing hadoop in a silent mode in single command with username and password.
I don't want to do
scp which replaces the whole file.
How can I do it in a single command supplying with username/password of another machine.