> and could you give me a sample in my situation using socat,I googled for it
> ,but I'm not quite understand it .... thanks again

To pipe in a password over SSH,
>From the socat man page:

--- excerpt ---

(sleep 5; echo PASSWORD; sleep 5; echo ls; sleep 1) |
socat - EXEC:’ssh -l user server’,pty,setsid,ctty

EXEC´utes  an  ssh  session to server. Uses a pty for communication
between socat and ssh, makes it ssh´s controlling tty (ctty), and
makes this pty the owner of a new process group (setsid), so ssh
accepts the password from socat.
--------------------

You can replace "ssh -l user server" above with "ssh-copy-id u...@server"

Joel

Reply via email to