users@glassfish.java.net

Re: glassfish asadmin setup-ssh non-interactive

From: <forums_at_java.net>
Date: Tue, 4 Oct 2011 19:36:23 -0500 (CDT)

Vineet,

'asadmin setup-ssh' typically prompts for two pieces of information:

  1) Whether or not you want it to generate a key
  2) The user's SSH password, so that it can copy the key over to the remote
     system

You can avoid the second prompt by passing the SSH password via an asadmin
password file. Putting this all together you end up with something like this:

$ echo "AS_ADMIN_SSHPASSWORD=testuser_ssh_password" > ./p $ asadmin
--passwordfile ./p setup-ssh --generatekey --sshuser testuser
testserver.domain $ rm ./p

--
[Message sent by forum member 'jfdipol']
View Post: http://forums.java.net/node/850202