JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle GlassFish Server 3.1-3.1.1 Reference Manual
search filter icon
search icon

Document Information

Preface

Oracle GlassFish Server 3.1 Section 1: asadmin Utility Subcommands

add-resources(1)

apply-http-lb-changes(1)

backup-domain(1)

change-admin-password(1)

change-master-broker(1)

change-master-password(1)

collect-log-files(1)

configure-jms-cluster(1)

configure-lb-weight(1)

configure-ldap-for-admin(1)

copy-config(1)

create-admin-object(1)

create-application-ref(1)

create-audit-module(1)

create-auth-realm(1)

create-backup-config(1)

create-cluster(1)

create-connector-connection-pool(1)

create-connector-resource(1)

create-connector-security-map(1)

create-connector-work-security-map(1)

create-custom-resource(1)

create-domain(1)

create-file-user(1)

create-http(1)

create-http-health-checker(1)

create-http-lb(1)

create-http-lb-config(1)

create-http-lb-ref(1)

create-http-listener(1)

create-http-redirect(1)

create-iiop-listener(1)

create-instance(1)

create-jacc-provider(1)

create-javamail-resource(1)

create-jdbc-connection-pool(1)

create-jdbc-resource(1)

create-jmsdest(1)

create-jms-host(1)

create-jms-resource(1)

create-jndi-resource(1)

create-jvm-options(1)

create-lifecycle-module(1)

create-local-instance(1)

create-message-security-provider(1)

create-network-listener(1)

create-node-config(1)

create-node-ssh(1)

create-password-alias(1)

create-profiler(1)

create-protocol(1)

create-protocol-filter(1)

create-protocol-finder(1)

create-resource-adapter-config(1)

create-resource-ref(1)

create-schedule(1)

create-service(1)

create-ssl(1)

create-system-properties(1)

create-threadpool(1)

create-transport(1)

create-virtual-server(1)

delete-admin-object(1)

delete-application-ref(1)

delete-audit-module(1)

delete-auth-realm(1)

delete-backup-config(1)

delete-cluster(1)

delete-config(1)

delete-connector-connection-pool(1)

delete-connector-resource(1)

delete-connector-security-map(1)

delete-connector-work-security-map(1)

delete-custom-resource(1)

delete-domain(1)

delete-file-user(1)

delete-http(1)

delete-http-health-checker(1)

delete-http-lb(1)

delete-http-lb-config(1)

delete-http-lb-ref(1)

delete-http-listener(1)

delete-http-redirect(1)

delete-iiop-listener(1)

delete-instance(1)

delete-jacc-provider(1)

delete-javamail-resource(1)

delete-jdbc-connection-pool(1)

delete-jdbc-resource(1)

delete-jmsdest(1)

delete-jms-host(1)

delete-jms-resource(1)

delete-jndi-resource(1)

delete-jvm-options(1)

delete-lifecycle-module(1)

delete-local-instance(1)

delete-message-security-provider(1)

delete-network-listener(1)

delete-node-config(1)

delete-node-ssh(1)

delete-password-alias(1)

delete-profiler(1)

delete-protocol(1)

delete-protocol-filter(1)

delete-protocol-finder(1)

delete-resource-adapter-config(1)

delete-resource-ref(1)

delete-schedule(1)

delete-ssl(1)

delete-system-property(1)

delete-threadpool(1)

delete-transport(1)

delete-virtual-server(1)

deploy(1)

deploydir(1)

disable(1)

disable-backup-config(1)

disable-http-lb-application(1)

disable-http-lb-server(1)

disable-monitoring(1)

disable-secure-admin(1)

disable-secure-admin-internal-user(1)

disable-secure-admin-principal(1)

enable(1)

enable-backup-config(1)

enable-http-lb-application(1)

enable-http-lb-server(1)

enable-monitoring(1)

enable-secure-admin(1)

enable-secure-admin-internal-user(1)

enable-secure-admin-principal(1)

export(1)

export-http-lb-config(1)

export-sync-bundle(1)

flush-connection-pool(1)

flush-jmsdest(1)

freeze-transaction-service(1)

generate-jvm-report(1)

get(1)

get-client-stubs(1)

get-health(1)

import-sync-bundle(1)

install-node(1)

jms-ping(1)

list(1)

list-admin-objects(1)

list-application-refs(1)

list-applications(1)

list-audit-modules(1)

list-auth-realms(1)

list-backup-configs(1)

list-backups(1)

list-clusters(1)

list-commands(1)

list-components(1)

list-configs(1)

list-connector-connection-pools(1)

list-connector-resources(1)

list-connector-security-maps(1)

list-connector-work-security-maps(1)

list-containers(1)

list-custom-resources(1)

list-domains(1)

list-file-groups(1)

list-file-users(1)

list-http-lb-configs(1)

list-http-lbs(1)

list-http-listeners(1)

list-iiop-listeners(1)

list-instances(1)

list-jacc-providers(1)

list-javamail-resources(1)

list-jdbc-connection-pools(1)

list-jdbc-resources(1)

list-jmsdest(1)

list-jms-hosts(1)

list-jms-resources(1)

list-jndi-entries(1)

list-jndi-resources(1)

list-jvm-options(1)

list-lifecycle-modules(1)

list-log-attributes(1)

list-log-levels(1)

list-message-security-providers(1)

list-modules(1)

list-network-listeners(1)

list-nodes(1)

list-nodes-config(1)

list-nodes-ssh(1)

list-password-aliases(1)

list-persistence-types(1)

list-probes(1)

list-protocol-filters(1)

list-protocol-finders(1)

list-protocols(1)

list-resource-adapter-configs(1)

list-resource-refs(1)

list-schedules(1)

list-secure-admin-internal-users(1)

list-secure-admin-principals(1)

list-sub-components(1)

list-supported-cipher-suites(1)

list-system-properties(1)

list-threadpools(1)

list-timers(1)

list-transports(1)

list-virtual-servers(1)

list-web-context-param(1)

list-web-env-entry(1)

login(1)

migrate-timers(1)

monitor(1)

multimode(1)

ping-connection-pool(1)

ping-node-ssh(1)

recover-transactions(1)

redeploy(1)

restart-domain(1)

restart-instance(1)

restart-local-instance(1)

restore-domain(1)

resume-domain(1)

rollback-transaction(1)

rotate-log(1)

run-script(1)

set(1)

set-log-attributes(1)

set-log-levels(1)

setup-ssh(1)

set-web-context-param(1)

set-web-env-entry(1)

show-component-status(1)

start-cluster(1)

start-database(1)

start-domain(1)

start-instance(1)

start-local-instance(1)

stop-cluster(1)

stop-database(1)

stop-domain(1)

stop-instance(1)

stop-local-instance(1)

suspend-domain(1)

undeploy(1)

unfreeze-transaction-service(1)

uninstall-node(1)

unset(1)

unset-web-context-param(1)

unset-web-env-entry(1)

update-admin-server-coordinates(1)

update-admin-server-local-coordinates(1)

update-connector-security-map(1)

update-connector-work-security-map(1)

update-file-user(1)

update-node-config(1)

update-node-ssh(1)

update-password-alias(1)

uptime(1)

validate-multicast(1)

verify-domain-xml(1)

version(1)

Oracle GlassFish Server 3.1 Section 1M: Utility Commands

Oracle GlassFish Server 3.1 Section 5ASC: GlassFish Server Concepts

Oracle GlassFish Server 3.1 Section 5GFP: Events

Index

setup-ssh

- sets up an SSH key on specified hosts

Synopsis

setup-ssh [--help]
[--sshport ssh-port] [--sshuser ssh-user]
[--sshkeyfile ssh-keyfile] [--sshpublickeyfile ssh-public-keyfile]
[--generatekey={false|true}]
host-list

Description

The setup-ssh subcommand sets up a secure shell (SSH) key on the hosts that are specified as the operand of the subcommand. This key enables GlassFish Server to use public-key authentication for authentication of the user's SSH login on remote hosts.

SSH ensures that GlassFish Server clusters that span multiple hosts can be administered centrally. When a user runs a subcommand for cluster administration that acts on multiple hosts, the subcommand is propagated from the domain administration server (DAS) host to remote hosts. To propagate subcommands that act on a GlassFish Server instance that is not running, or on a node where no instances are running, GlassFish Server uses SSH. SSH provides confidentiality and security for data that is exchanged between the DAS and remote hosts.

Public-key authentication uses an SSH key pair that comprises the following keys:

The subcommand does not require any configuration information from the DAS and does not modify the configuration of the DAS.

This subcommand is supported in local mode only.

Prerequisites for Using the setup-ssh Subcommand

To use the setup-ssh subcommand, the SSH user must be able to use SSH to log in to remote hosts where SSH is to be set up. Specifically, the following prerequisites must be met:

Behavior of the setup-ssh Subcommand

The subcommand sets up SSH connectivity between the DAS host and remote hosts by automating the following tasks:

Options

--help
-?

Displays the help text for the subcommand.

--sshport

The port to use for SSH connections to the host where SSH is being set up. The default is 22.

--sshuser

The SSH user on the remote host that is to run the process for setting up SSH on that host. The default is the user that is running this subcommand. To ensure that the DAS can read this user's SSH private key file, specify the user that is running the DAS process.

--sshkeyfile

The absolute path to the SSH private key file for user that the --sshuser option specifies. This file is used for authentication to the sshd daemon on the host.

The user that is running this subcommand must be able to reach the path to the key file and read the key file.

The default is a key file in the user's .ssh directory on the host where the subcommand is run. If multiple key files are found, the subcommand uses the following order of preference:

  1. id_rsa

  2. id_dsa

  3. identity

--sshpublickeyfile

The absolute path to the SSH public key file for user that the --sshuser option specifies. The content of the public key file is appended to the user's .ssh/authorized_keys file on each host where SSH is being set up. If the .ssh/authorized_keys file does not exist on a host, the subcommand creates the file.

The user that is running this subcommand must be able to reach the path to the key file and read the key file.

The default is a key file in the user's .ssh directory on the host where the subcommand is run. If multiple key files are found, the subcommand uses the following order of preference:

  1. id_rsa.pub

  2. id_dsa.pub

  3. identity.pub

--generatekey

Specifies whether the subcommand generates the SSH key files without prompting the user.

Possible values are as follows:

true

The subcommand generates the SSH key files without prompting the user.

false

The behavior of the subcommand depends on whether the SSH key files exist:

  • If the SSH key files exist, the subcommand does not generate the files.

  • If the SSH key files do not exist, the behavior of the subcommand depends on the value of the --interactive option of the asadmin utility:

    • If the --interactive option is true, the subcommand prompts the user to create the files.

    • If the --interactive option is false, the subcommand fails.

This value is the default.

Operands

host-list

A space-separated list of the names of the hosts where an SSH key is to be set up.

Examples

Example 1 Setting Up an SSH Key

This example sets up an SSH key for the user gfuser on the hosts sj03 and sj04. The key file is not generated but is copied from the user's .ssh directory on the host where the subcommand is running.

asadmin> setup-ssh sj03 sj04
Enter SSH password for gfuser@sj03> 
Copied keyfile /home/gfuser/.ssh/id_rsa.pub to gfuser@sj03
Successfully connected to gfuser@sj03 using keyfile /home/gfuser/.ssh/id_rsa
Copied keyfile /home/gfuser/.ssh/id_rsa.pub to gfuser@sj04
Successfully connected to gfuser@sj04 using keyfile /home/gfuser/.ssh/id_rsa
Command setup-ssh executed successfully.

Example 2 Generating and Setting Up an SSH Key

This example generates and sets up an SSH key for the user gfuser on the hosts sua01 and sua02.

asadmin> setup-ssh --generatekey=true sua01 sua02
Enter SSH password for gfuser@sua01> 
Created directory /home/gfuser/.ssh
/usr/bin/ssh-keygen successfully generated the identification /home/gfuser/.ssh/id_rsa
Copied keyfile /home/gfuser/.ssh/id_rsa.pub to gfuser@sua01
Successfully connected to gfuser@sua01 using keyfile /home/gfuser/.ssh/id_rsa
Copied keyfile /home/gfuser/.ssh/id_rsa.pub to gfuser@sua02
Successfully connected to gfuser@sua02 using keyfile /home/gfuser/.ssh/id_rsa
Command setup-ssh executed successfully.

Exit Status

0

command executed successfully

1

error in executing the command

See Also

ssh(1), ssh-keygen(1)

asadmin(1M)

sshd(1M)

Cygwin Information and Installation, MKS Software