SSHを介して接続する各サーバーに設定ファイルを設定できますか?

SSHを介して接続する各サーバーに設定ファイルを設定できますか?

仕事のために、クラウドに新しい仮想マシンを頻繁に作成する必要があります。新しいリモートサーバーに接続するたびに、いくつかの設定を手動で設定するssh必要があります。completion-ignore-case on~/.inputrc

これらの設定を一度設定してどこでも実行できますか?

ベストアンサー1

SSHを使用して新しいリモートサーバーに接続するたびに、〜/ .inputrcで完了無視 - ケースなどのいくつかの構成を手動で設定する必要があります。

ローカルまたはリモートコンピュータで?

ローカルマシンの場合は、次のオプションを参照してください。.ssh/config(からインポートman 5 ssh_config):

     LocalCommand
             Specifies a command to execute on the local machine
             after successfully connecting to the server.  The
             command string extends to the end of the line, and is
             executed with the user's shell.  Arguments to
             LocalCommand accept the tokens described in the
             TOKENS section.

             The command is run synchronously and does not have
             access to the session of the ssh(1) that spawned it.
             It should not be used for interactive commands.

             This directive is ignored unless PermitLocalCommand
             has been enabled.

リモートコマンド実行の場合は、特別な(事前)artisan inputrcファイルにSendEnv変数を設定するオプションを使用できます。 (INPUTRCリファレンスと検索)INPUTRCman 1 bash

おすすめ記事