SSH Push (トンネル使用)接続メソッド

SSH Push (with tunnel) (ssh-push-tunnel) is used in environments where clients cannot reach the SUSE Multi-Linux Manager Server directly. In this environment, clients are located in a firewall-protected zone called a DMZ. No system within the DMZ is authorized to open a connection to the internal network, including the SUSE Multi-Linux Manager Server.

つまり、SSH Push (トンネル使用)は、サーバからクライアントへのリバーストンネルだけでなく、クライアントからSUSE Multi-Linux Managerサーバへのリバーストンネルも作成します。

サーバは、SSHを使用して、定期的にクライアントに接続し、チェックインし、スケジュールされたアクションおよびイベントを実行します。

プロビジョニングモデルを使用したシステムの再インストールは、SSH Pushで管理されているクライアントでは現在サポートされていません。

トンネルを使用して、暗号化されたトンネルを介したサーバへのアクセスを提供します。SSH Pushクライアント(トンネル使用)に割り当てられたリポジトリは、このトンネルを介してのみ提供されます。したがって、リポジトリを利用できるのはトンネルの動作中だけであるため、クライアントシステムから直接、パッケージマネージャツールを使用することはできません。つまり、セッションがサーバによって開始された場合にのみ、アクセスが可能です。クライアント上でのすべてのパッケージ管理操作はサーバ側からのみ実行できます。

Use mgrctl term before running steps inside the server container.

For tunneling connections via SSH, a port number is required for tunneling via HTTPS. The port number used by default is 1233. To overwrite it, inside the container, you can add a custom port numbers greater than 1024 to /etc/rhn/rhn.conf:

ssh_push_port_https = high_port

After changing this configuration parameter you must restart services such as salt-secrets-config.service, tomcat.service, and taskomatic.service. To cover all needed services, it is the best to restart the SUSE Multi-Linux Manager Server as root. Outside of the container, from the container host, enter:

mgradm restart

For security reasons, you might want to use sudo with SSH, to access the system as an unprivileged user instead of as root.

プロシージャ: 非特権SSHアクセスの設定
  1. それぞれのクライアントシステムで、適切な非特権ユーザを作成します。

  2. Configure passwordless sudo access on the client for the unprivileged user. For detailed instructions, see Root Access and sudo Configuration.

  3. Inside the SUSE Multi-Linux Manager Server container, edit the /etc/rhn/rhn.conf configuration file, and add or amend this line to include the unprivileged username:

    ssh_push_sudo_user = <user>

After changing this configuration parameter you must restart services such as salt-secrets-config.service, tomcat.service, and taskomatic.service. To cover all needed services, it is the best to restart the SUSE Multi-Linux Manager Server as root. Outside of the container, from the container host, enter:

mgradm restart

Web UIまたはAPIを使用して、これらのクライアントをSUSE Multi-Linux Managerサーバに登録する必要があります。

始める前に、SSHトンネルに使用するポートを指定済みであることを確認する必要があります。ポート番号を変更する前にクライアントを登録した場合、再アクティベーションキーを使用して再登録する必要があります。

例: SSH Push (トンネル使用)へのAPIアクセス

You can use the API to manage which contact method to use. This example Python code sets the contact method to ssh-push-tunnel.

client = xmlrpclib.Server(MLM_HOST + "/rpc/api", verbose=0)
key = client.auth.login(MLM_LOGIN, MLM_PASSWORD)
client.system.setDetails(key, 1000012345, {'contact_method' : 'ssh-push-tunnel'})

有効な値は次のとおりです。

  • default (pull)

  • ssh-push

  • ssh-push-tunnel