豆乳ドットコム
豆乳ドットコム

Ubuntuを作成したあとやるべきこと

新しいユーザーを作成する

adduser [user_name]

user_nameを自分の名前などにする

新しいユーザーにsudo権限を付与する

gpasswd -a [user_name] sudo

user_nameを自分の名前などにする

sshのパスワードでのアクセスを許可する

パスワードは証明書に比べて脆弱だが実験環境ではパスワードが複雑であれば問題ない

sudo vim /etc/ssh/sshd_config
https://storage.googleapis.com/zenn-user-upload/2c775f8916c3-20220722.png

noをyesにする

ついでにSSHセッションが自動で切れないようにする

https://storage.googleapis.com/zenn-user-upload/104f84350f00-20220722.png

ClientAliveIntervalを120に
ClientAliveCountMaxを3に

Bashにする

なぜかUbuntuではデフォルトでshになっている場合があるのでbashに変更

chsh -s /bin/bash [user_name]

sshdを再起動する

sudo systemctl restart sshd

今のグローバルIPを確認する

curl inet-ip.info

aptをアップグレード

apt upgrade
実行環境
  • MacBook Pro 13inch M1, 2020 (MacOS 12.5.1)
  • iPad Pro 11inch
  • iPhone 13 mini
  • 本サイトは解決策を手短に書いています。問題等ございましたらコメントでご連絡ください。

    https://www.tounyuu.com/21
    License:CC BY-NC-SA 3.0 Unported
    # # # #
    Homepage      未分類      Ubuntuを作成したあとやるべきこと

    大豆

    Author

    Leave a Reply

    textsms
    account_circle
    email

    豆乳ドットコム

    Ubuntuを作成したあとやるべきこと
    新しいユーザーを作成する adduser [user_name] user_nameを自分の名前などにする 新しいユーザーにsudo権限を付与する gpasswd -a [user_name] sudo user_nameを自分の名…
    Scan QR code to continue reading
    2022-08-24