31-05-2013, 07:15 PM
СоÑ
Ñанение SSH паÑолÑ:
Код:
# will ask for password here
ssh -NfM -o 'ControlPath=~/.ssh/%r@%h:%p.conn' "$HOST"
# uses existing connection, doesn't ask for password
scp -o 'ControlPath=~/.ssh/%r@%h:%p.conn' $2 up@$HOST/tmp/
ssh -o 'ControlPath=~/.ssh/%r@%h:%p.conn' up@$HOST '/tmp/makeup.sh && reboot'
# close the connection
ssh -o 'ControlPath=~/.ssh/%r@%h:%p.conn' -O exit "$HOST"