sshの基本を理解する

chmod コマンドを数字で表現する

使い方

#chmod 700 test.txt

4 2 1
r w x

ssh接続の流れ

www.bnote.net joker.hatenablog.com

以後参考に進めていく。

# aptitude update
# aptitude install ssh

qiita.com

/etc/ssh/sshd_config

最終的な内容。 #を消して記述することが必須。 PermitRootLogin prohibit-passwordを削除してPermitRootLogin noを追加する。

 Logging
#SyslogFacility AUTH
#LogLevel INFO

# Authentication:

#LoginGraceTime 2m
PermitRootLogin no ★
#StrictModes yes
#MaxAuthTries 6
#MaxSessions 10
...

# To disable tunneled clear text passwords, change to no here!
PasswordAuthentication no ★
PermitEmptyPasswords no  ★

# Change to yes to enable challenge-response passwords (beware issues with
# some PAM modules and threads)
ChallengeResponseAuthentication no ★

sshdではなくsshでコマンドを入力する。 またその際に root ユーザである必要がある。

root@ik1-405-34928:~# /etc/init.d/sshd reload
-bash: /etc/init.d/sshd: No such file or directory
root@ik1-405-34928:~# /etc/init.d/ssh reload
Reloading ssh configuration (via systemctl): ssh.service.
root@ik1-405-34928:~#