john pfeiffer
  • Home
  • Categories
  • Tags
  • Archives

Htpasswd remote add user.sh

!/usr/bin/expect

set timeout 1

set username [lindex $argv 0] set userpass [lindex $argv 1]

spawn ssh scriptguardian@remotemachine "/webadmin/htpasswd-add-user.sh $username $userpass"

expect "The authenticity of host 'remotemachine (192.168.245.245)' can't be established." expect "RSA key fingerprint is ff:38:9d:79:44:28:63:0c:ff:cd:97:22:4f:19:6f:a4." expect "Are you sure you want to continue connecting (yes/no)?"

send "yes\n"

expect "scriptguardian@remotemachine's password: "

send "THEPASSWORD\n"

interact


  • « Htpasswd remove user script caller.sh
  • Cp with percent progress »

Published

Feb 6, 2010

Category

linux

~54 words

Tags

  • add 9
  • htpasswd 7
  • remote 15
  • scripts 63
  • user.sh 4