LoginSignup
7
7

More than 5 years have passed since last update.

Serversman@VPS 初期設定

Last updated at Posted at 2014-01-20

まずはじめにすること。自分用メモ

初めてのSSH接続

$ ssh -p [ポート番号] root@[IPアドレス]
The authenticity of host ******* can't be established.
RSA key fingerprint is ********.
Are you sure you want to continue connecting (yes/no)? yes
#

管理者ユーザーの追加

# useradd -G wheel [ユーザー名]
# passwd [パスワード]
ユーザー [ユーザー名] のパスワードを変更。
新しいパスワード:
新しいパスワードを再入力してください:
passwd: 全ての認証トークンが正しく更新できました
#

sudoユーザーの追加とwheelグループの設定

# visudo
%wheel ALL=(ALL) ALL

ログイン設定についての設定

# vi /etc/ssh/sshd_config

Rootでのログインを禁止して接続するユーザーを設定する

#PermitRootLogin yes
PermitRootLogin no

AllowUsers [ユーザー名]

sshd再起動

# /etc/init.d/sshd restart
sshd を停止中:                                             [  OK  ]
sshd を起動中:                                             [  OK  ]
#

⇒ここで無事接続できるかを別のウィンドウで確認しておく!

7
7
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
7