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 |
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
セキュリティ上の理由から、SSHでsudoを使用して、rootとしてではなく非特権ユーザとしてシステムにアクセスする必要がある場合があります。
-
それぞれのクライアントシステムで、適切な非特権ユーザを作成します。
-
On each client system, edit the
sudoersfile:sudo visudo
-
Grant
sudoaccess to the user by adding this line at the end of thesudoersfile. Replace<user>with the name of the user that is bootstrapping the client in the Web UI:<user> ALL=NOPASSWD: /usr/bin/python3, /var/tmp/venv-salt-minion/bin/python
This procedure grants root access without requiring a password, which is required for registering the client. When the client is successfully installed it runs with root privileges, so the access is no longer required. We recommend that you remove the line from the
sudoersfile after the client has been successfully installed. -
Inside the SUSE Multi-Linux Manager Server container, edit the
/etc/rhn/rhn.confconfiguration 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トンネルに使用するポートを指定済みであることを確認する必要があります。ポート番号を変更する前にクライアントを登録した場合、再アクティベーションキーを使用して再登録する必要があります。
-
ブートストラップの詳細については、ブートストラップスクリプトを使用してクライアントを登録するを参照してください。
-
ブートストラップの詳細については、client-configuration:activation-keys.adoc#activation-keys-reactivationを参照してください。
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