ログインプロンプトを無効にするには? [閉鎖]

ログインプロンプトを無効にするには? [閉鎖]

VPSがあり、noVNCを使用してログインできます。 SSH経由のログインだけを制限したいです。

  1. ログインプロンプトを表示する部分を削除できますか? (ttyをブロックするためにsystemdを使用する代わりにそれを修正する方が良いです)
hostname login:

ここに画像の説明を入力してください。

ベストアンサー1

記事を理解したら、SSH経由でログインプロンプトを変更するように求められます。
SSHD

sshd には、/etc/ssh/sshd_config に独自のオプション "?PrintMotd" があります。デフォルトは「yes」ですが、Debian のデフォルト設定では「no」に設定されています。それ以外の場合は、motdが2回印刷されます。一度はpam_motdによって、2番目はsshd自体によって印刷されます。 motdは、多重化SSH接続には表示されず、認証する「最初の」セッションにのみ表示されます。 [1]:https://wiki.debian.org/motd#A.2Fetc.2Fmotd_in_current_versions_.288.2B-.29_of_Debian

または

/etc/問題

ログインプロンプトの前に表示されるテキストは/etc/issueに保存されます(次のような関連ファイル/etc/issue.netがあります)。今後ユーザーはシェルが起動する前にログインします。これはプレーンテキストファイルですが、TTYエスケープシーケンスを許可します。

質問ファイルには、さまざまな情報を表示する特定の文字シーケンスを含めることができます。すべての問題シーケンスはバックスラッシュ()とそれに続く文字の1つで構成されます(したがって、/ etc / issueの\ dは現在の日付を挿入します)。

\b -- Baudrate of the current line.
\d -- Current date.
\s -- System name, the name of the operating system.
\l -- Name of the current tty line.
\m -- Architecture identifier of the machine, eg. i486
\n -- Nodename of the machine, also known as the hostname.
\o -- Domainname of the machine.
\r -- Release number of the OS, eg. 1.1.9.
\t -- Current time.
\u -- Number of current users logged in.
\U -- The string "1 user" or " users" where is the number of current users logged in.
\v -- Version of the OS, eg. the build-date etc.

おすすめ記事