blob: 0f17cd14608fff3699f87df7b0f643d132581559 [file] [log] [blame]
type=page
status=published
title=update-node-ssh
next=update-password-alias.html
prev=update-node-dcom.html
~~~~~~
= update-node-ssh
[[update-node-ssh-1]][[GSRFM00256]][[update-node-ssh]]
== update-node-ssh
Updates the configuration data of a node
[[sthref2299]]
=== Synopsis
[source]
----
asadmin [asadmin-options] update-node-ssh [--help]
[--nodehost node-host]
[--installdir as-install-parent] [--nodedir node-dir]
[--sshport ssh-port] [--sshuser ssh-user]
[--sshkeyfile ssh-keyfile]
[--force={false|true}]
node-name
----
[[sthref2300]]
=== Description
The `update-node-ssh` subcommand updates the configuration data of a
node. This subcommand requires secure shell (SSH) to be configured on
the machine where the domain administration server (DAS) is running and
on the machine where the node resides. You may run this subcommand from
any machine that can contact the DAS.
This subcommand can update any node, regardless of whether the node is
enabled for remote communication. If the node is not enabled for remote
communication, the subcommand enables SSH communication for the node and
updates any other specified configuration data.
Options of this subcommand specify the new values of the node's
configuration data. The default for most options is to leave the
existing value unchanged. However, if this subcommand is run to enable
SSH communication for a node, default values are applied if any of the
following options is omitted:
* `--sshport`
* `--sshuser`
* `--sshkeyfile`
By default, the subcommand fails and the node is not updated if the DAS
cannot contact the node's host through SSH. To force the node to be
updated even if the host cannot be contacted through SSH, set the
`--force` option to `true`.
This subcommand is supported in remote mode only.
[[sthref2301]]
=== Options
asadmin-options::
Options for the `asadmin` utility. For information about these
options, see the link:asadmin.html#asadmin-1m[`asadmin`(1M)] help page.
`--help`::
`-?`::
Displays the help text for the subcommand.
`--nodehost`::
The name of the host that the node is to represent after the node is
updated.
`--installdir`::
The full path to the parent of the base installation directory of the
{productName} software on the host, for example,
`/export/glassfish7`.
`--nodedir`::
The path to the directory that is to contain {productName}
instances that are created on the node. If a relative path is
specified, the path is relative to the as-install directory, where
as-install is the base installation directory of the {productName}
software on the host.
`--sshport`::
The port to use for SSH connections to this node's host. The default
depends on whether this subcommand is run to enable SSH communication
for the node:
* If the node is already enabled for communication over SSH, the
default is to leave the port unchanged.
* If this subcommand is run to enable SSH communication for the node,
the default port is 22.
+
If the `--nodehost` is set to `localhost`, the `--sshport` option is ignored.
`--sshuser`::
The user on this node's host that is to run the process for connecting
to the host through SSH. The default depends on whether this
subcommand is run to enable SSH communication for the node:
* If the node is already enabled for communication over SSH, the
default is to leave the user unchanged.
* If this subcommand is run to enable SSH communication for the node,
the default is the user that is running the DAS process.
+
If the `--nodehost` option is set to `localhost`, the `--sshuser`
option is ignored.
`--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 node's host.
+
[NOTE]
====
{productName} also supports password authentication through the
`AS_ADMIN_SSHPASSWORD` entry in the password file. The password file
is specified in the `--paswordfile` option of the
link:asadmin.html#asadmin-1m[`asadmin`(1M)] utility.
====
+
If the SSH private key file is protected by a passphrase, the password
file must contain the `AS_ADMIN_SSHKEYPASSPHRASE` entry. +
The path to the key file must be reachable by the DAS and the key file
must be readable by the DAS. +
The default depends on whether this subcommand is run to enable SSH
communication for the node:
* If the node is already enabled for communication over SSH, the
default is to leave the key file unchanged.
* If this subcommand is run to enable SSH communication for the node,
the default is the key file in the user's `.ssh` directory. If
multiple key files are found, the subcommand uses the following order of preference:
1. `id_rsa`
2. `id_dsa`
3. `identity`
`--force`::
Specifies whether the node is updated even if validation of the node's
parameters fails. To validate a node's parameters, the DAS must be
able to contact the node's host through SSH. Possible values are as
follows:
`false`;;
The node is not updated if validation of the node's parameters fails
(default).
`true`;;
The node is updated even if validation of the node's parameters
fails.
[[sthref2302]]
=== Operands
node-name::
The name of the node to update. The node must exist. Otherwise, an
error occurs.
[[sthref2303]]
=== Examples
[[GSRFM792]][[sthref2304]]
==== Example 1   Updating the Host That a Node Represents
This example updates the host that the node `lssh` represents to `sj04`.
[source]
----
asadmin> update-node-ssh --nodehost sj04 lssh
Command update-node-ssh executed successfully.
----
[[GSRFM793]][[sthref2305]]
==== Example 2   Forcing the Update of a Node
This example forces the update of the node `sj01` to enable the node to
communicate over SSH.
[source]
----
asadmin> update-node-ssh --force sj01
Warning: some parameters appear to be invalid.
Could not connect to host sj01 using SSH.
Could not authenticate. Tried authenticating with specified key at
/home/gfuser/.ssh/id_rsa
Continuing with node update due to use of --force.
Command update-node-ssh executed successfully.
----
[[sthref2306]]
=== Exit Status
0::
command executed successfully
1::
error in executing the command
[[sthref2307]]
=== See Also
link:asadmin.html#asadmin-1m[`asadmin`(1M)]
link:create-node-dcom.html#create-node-dcom-1[`create-node-dcom`(1)],
link:create-node-config.html#create-node-config-1[`create-node-config`(1)],
link:create-node-ssh.html#create-node-ssh-1[`create-node-ssh`(1)],
link:delete-node-config.html#delete-node-config-1[`delete-node-config`(1)],
link:delete-node-dcom.html#delete-node-dcom-1[`delete-node-dcom`(1)],
link:delete-node-ssh.html#delete-node-ssh-1[`delete-node-ssh`(1)],
link:install-node.html#install-node-1[`install-node`(1)],
link:install-node-dcom.html#install-node-dcom-1[`install-node-dcom`(1)],
link:install-node-ssh.html#install-node-ssh-1[`install-node-ssh`(1)],
link:list-nodes.html#list-nodes-1[`list-nodes`(1)],
link:uninstall-node.html#uninstall-node-1[`uninstall-node`(1)],
link:uninstall-node-dcom.html#uninstall-node-dcom-1[`uninstall-node-dcom`(1)],
link:uninstall-node-ssh.html#uninstall-node-ssh-1[`uninstall-node-ssh`(1)],
link:update-node-config.html#update-node-config-1[`update-node-config`(1)],
link:update-node-ssh.html#update-node-dcom-1[`update-node-dcom`(1)]