事前確認事項

設定箇所

/etc/ssh/sshd_config

Port 22 
Protocol 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
UsePrivilegeSeparation yes
KeyRegenerationInterval 3600
ServerKeyBits 768
SyslogFacility AUTH
LogLevel INFO
LoginGraceTime 120
PermitRootLogin no
StrictModes yes
RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile	%h/.ssh/authorized_keys
IgnoreRhosts yes
RhostsRSAAuthentication no
HostbasedAuthentication no
PermitEmptyPasswords no
ChallengeResponseAuthentication no
PasswordAuthentication no
X11Forwarding yes
X11DisplayOffset 10
PrintMotd no
PrintLastLog yes
TCPKeepAlive yes
AcceptEnv LANG LC_*
Subsystem sftp /usr/lib/openssh/sftp-server
UsePAM no
AllowUsers user1 user2 user3

SCPなどのアクセスログを残す方法

/etc/ssh/sshd_configの

Subsystem sftp /usr/lib/openssh/sftp-server -f AUTH -l INFO

などとして

sshd -t

で確認し

/etc/init.d/sshd reload

をする。そうすると

/var/log/auth.log

出力されるようになる

パスワードを変更する場合

ssh-keygen -p -f ./.ssh/id_rsa
Enter old passphrase:
Key has comment './.ssh/id_rsa'
Enter new passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved with the new passphrase.

確認方法

エラー時には

参考URL


トップ   編集 凍結 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2012-03-12 (月) 16:54:34 (197d)