Setting up ssh and rsh connection using the utility

The password utility,, is bundled under the scripts directory. The users can run the utility in their script to set up the ssh and rsh connection automatically.

# ./ -h

Command syntax with simple format: check|configure|unconfigure ssh|rsh <hostname|IP addr> 
				[<user>] [<password>] [<port>]

Command syntax with advanced format: [--action|-a 'check|configure|unconfigure']
               [--type|-t 'ssh|rsh']
               [--user|-u  '<user>']
               [--password|-p '<password>']
               [--port|-P '<port>']
               [--hostfile|-f '<hostfile>']
               [--keyfile|-k '<keyfile>']
               <host_URI> -h | -?

Table: Options with utility



--action|-a 'check|configure|unconfigure'

Specifies action type, default is 'check'.

--type|-t 'ssh|rsh'

Specifies connection type, default is 'ssh'.

--user|-u '<user>'

Specifies user id, default is the local user id.

--password|-p '<password>'

Specifies user password, default is the user id.

--port|-P '<port>'

Specifies port number for ssh connection, default is 22

--keyfile|-k '<keyfile>'

Specifies the private key file.

--hostfile|-f '<hostfile>'

Specifies the file which list the hosts.


Prints debug information.


Prints help messages.


Can be in the following formats:





You can check, configure, and unconfigure ssh or rsh using the pwdutil.plutility. For example:

You can see the contents of the configuration file by using the following command:

# cat /tmp/sshrsh_hostfile

# all default: check ssh connection with local user
The following exit values are returned:

0     Successful completion.
1     Command syntax error.
2     Ssh or rsh binaries do not exist.
3     Ssh or rsh service is down on the remote machine.
4     Ssh or rsh command execution is denied due to password is required.
5     Invalid password is provided.
255   Other unknown error.