Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 06-02-2008, 07:28 PM   #1
Registered: Apr 2004
Posts: 682

Rep: Reputation: Disabled
SSH password automation

I am using ssh-copy-id(1) to distribute ssh keys to servers. I am using a shell script. But the problem is I need to type the password every time ssh-copy-id copies the key to a server. So if I were to distribute the key to 100 servers I need to type the same password 100 times. Is there any simple way to automate this?

Thanks for any help. Here's the script I am using:


for i in server1 server2 server3;
        ssh-copy-id -i username@$i
Old 06-02-2008, 10:38 PM   #2
LQ Guru
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 256Reputation: 256Reputation: 256
Learn expect.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
ssh with password adnanm Linux - Newbie 6 03-25-2011 11:08 AM
SSH without password thefountainhead100 Linux - Kernel 8 03-16-2008 02:54 AM
ssh automation stopped working lin2winwin Linux - Networking 2 12-05-2007 10:58 AM
need help with no password ssh and ssh-agent hedpe Linux - Networking 3 02-08-2007 08:49 PM
password less SSH maaand Linux - Networking 0 04-23-2002 08:13 PM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:22 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration