Connecting in Python to a RAD Instance by Using a URI

You can use the standard URI format to connect to a RAD instance. The URI format is as follows:

scheme://user?@host:port?auth=value
scheme

(Mandatory) The supported schemes are unix, rad, rads, and ssh.

user

(Optional) The user who is connecting to the remote RAD instance. If you do not specify the user, the current user is assumed.

host

(Mandatory) The system that contains the remote RAD instance.

port

(Optional) The port number. The default port is 12302 (RAD IANA port).

auth

(Optional) The authentication method that is used to connect to the remote RAD instance. The supported values are pam and gss. If you do not specify the authentication, then pam is assumed. If you are using SSH as the transport protocol, you must not specify the authentication mechanism.

Example 2-45 Python Language – Connecting to a RAD Instance by Using a URI

The following example shows how to open a TCP connection as jdoe to the host abc at port 10000 with default authentication.

rads://jdoe@abc.example.com:10000

The following example shows how to open a TLS connection as hg to the host abc at the default RAD port with gss authentication.

radg://hg@abc.example.com?auth=gss

The following example shows how to open an SSH connection as the current user to the host abc at the default SSH port.

ssh://abc.example.com

The following example shows how to open a connection to a local RAD instance.

unix:///path