![]() ![]() $ prsync -h ~/.pssh_hosts_files *.html /var/www/html/ How do I kill processes in parallel on a number of hosts? ![]() $ prsync -h ~/.pssh_hosts_files /etc/passwd /tmp/ $ pscp -h ~/.pssh_hosts_files $HOME/demo.txt /tmp/ To copy $HOME/demo.txt to /tmp/ on all servers, enter: $ pssh -h ~/.pssh_hosts_files - sudo apt-get -y upgrade How do I use pssh to copy file to all servers? $ pssh -h ~/.pssh_hosts_files - sudo apt-get -y update $ pssh -h ~/.pssh_hosts_files - sudo yum -y update You can now automate common sysadmin tasks such as patching all servers: Here is my sample file named ~/.pssh_hosts_files: Each line in the host file are of the form and can include blank lines and comments lines beginning with “#”. How to use pssh commandįirst you need to create a text file called hosts file from which pssh read hosts names. $ ssh ssh my previous tutorials SSH Public Key Based Authentication on a Linux/Unix server and set up SSH Keys on a Linux / Unix System for more information on passwordless SSH topics. $ ssh-copy-id ssh-copy-id ssh-copy-id ssh-copy-id ssh-copy-id it using the ssh command: Next transfer the public key to the remote host using the ssh-copy-id command: To generate a key pair run the ssh-keygen command: It is recommend that you set up ssh keys for automation. $ pip install pssh Set passwordless SSH using public-private key pairs Fig.05: Installing pssh on Fedora Installing pssh on Arch Linux ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |