FreeBSD sshdの設定 rootのsshログインを許可

/ Linux/Unix / Comment[0]
インストール時にsshdを有効にしたのでシステム起動時に起動するようになっているのですが、
どうやらデフォのままではログインできないようなので、設定を見直してみようと思います。
これは実験機の設定のためセキュリティに特化した設定ではないことをご了承ください。

有効
/etc/rc.conf
:
sshd_enable="YES"
:


sshdは起動してる模様
# ps -ax|grep sshd
49265 - Is 0:00.00 /usr/sbin/sshd


sshd_configを見てみたらログイン関係の項目が全てコメントアウトされており
明らかにログインさせる気は感じられませんでした。ちゃんと設定しろよってことですね。

というわけで必要な項目を有効にします。
# vi /etc/ssh/sshd_config
Port 22 #任意のポート
PermitRootLogin yes #rootログインを許可
PasswordAuthentication yes #パスワードログインの許可

sshdを再起動
# service sshd restart


puttyからFreeBSDにrootログインできました
Welcome to FreeBSD!

Before seeking technical support, please use the following resources:

o Security advisories and updated errata information for all releases are
at http://www.FreeBSD.org/releases/ - always consult the ERRATA section
for your release first as it's updated frequently.

o The Handbook and FAQ documents are at http://www.FreeBSD.org/ and,
along with the mailing lists, can be searched by going to
http://www.FreeBSD.org/search/. If the doc package has been installed
(or fetched via pkg install lang-freebsd-doc, where lang is the
2-letter language code, e.g. en), they are also available formatted
in /usr/local/share/doc/freebsd.

If you still have a question or problem, please take the output of
`uname -a', along with any relevant error messages, and email it
as a question to the questions@FreeBSD.org mailing list. If you are
unfamiliar with FreeBSD's directory layout, please refer to the hier(7)
manual page. If you are not familiar with manual pages, type `man man'.

Edit /etc/motd to change this login announcement.

root@FreeBSD:~ #
関連記事

コメント

:
:
:
:
:
管理人のみ表示を許可