玄箱HGメモ/Debian/SSH導入
緑文字が入力コマンド。
telnetに代わるSSHサーバーを導入します。
管理者権限(管理者アカウント参照)で作業する必要があります。
KAGUYA:~# aptitude install ssh[ENTER]
SSH導入画面(例)
Reading Package Lists... Done Building Dependency Tree Reading extended state information Initializing package states... Done Reading task descriptions... Done The following NEW packages will be automatically installed: libedit2 libkrb53 libselinux1 libsepol1 openssh-blacklist openssh-client openssh-server The following packages have been kept back: adduser apt apt-utils aptitude base-files base-passwd bash bsdmainutils bsdutils console-common console-data console-tools coreutils cpio cron debconf debconf-i18n debianutils dhcp-client dpkg dselect e2fslibs e2fsprogs fileutils findutils ftp gcc-3.3-base gettext-base grep groff-base gzip hostname ifupdown info initscripts iptables klogd libacl1 libattr1 libblkid1 libcomerr2 libconsole libdb1-compat libdb3 libdb4.2 libgcc1 libgdbm3 libldap2 liblocale-gettext-perl liblockfile1 liblzo1 libpam-modules libpam-runtime libpam0g libpcre3 libpopt0 libsasl2 libss2 libstdc++2.10-glibc2.2 libstdc++5 libtext-charwidth-perl libtext-iconv-perl libtext-wrapi18n-perl libuuid1 libwrap0 login logrotate make makedev man-db manpages modconf module-init-tools modutils mount nano ncurses-base ncurses-bin net-tools netbase netkit-ping nvi passwd pciutils perl perl-base perl-modules powerpc-utils procps psmisc sed shellutils sysklogd sysv-rc sysvinit tar tasksel tcpd telnet telnetd textutils util-linux whiptail yaboot zlib1g The following NEW packages will be installed: libedit2 libkrb53 libselinux1 libsepol1 openssh-blacklist openssh-client openssh-server ssh The following packages will be upgraded: libncurses5 The following packages are RECOMMENDED but will NOT be installed: libgpmg1 1 packages upgraded, 8 newly installed, 0 to remove and 105 not upgraded. Need to get 4021kB of archives. After unpacking 8462kB will be used. Do you want to continue? [Y/n/?]
Y[ENTER]
Writing extended state information... Done Get:1 ftp://ftp.dti.ad.jp stable/main libncurses5 5.5-5 [314kB] Get:2 http://security.debian.org stable/updates/main openssh-client 1:4.3p2-9etch3 [701kB] Get:3 ftp://ftp.dti.ad.jp stable/main libsepol1 1.14-2 [125kB] Get:4 ftp://ftp.dti.ad.jp stable/main libselinux1 1.32-3 [62.8kB] Get:5 ftp://ftp.dti.ad.jp stable/main libkrb53 1.4.4-7etch6 [399kB] Get:6 http://security.debian.org stable/updates/main openssh-blacklist 0.1.1 [2122kB] Get:7 ftp://ftp.dti.ad.jp stable/main libedit2 2.9.cvs.20050518-2.2 [59.2kB] Get:8 http://security.debian.org stable/updates/main openssh-server 1:4.3p2-9etch3 [237kB] Get:9 http://security.debian.org stable/updates/main ssh 1:4.3p2-9etch3 [1052B] Fetched 4021kB in 13s (302kB/s) Preconfiguring packages ... (Reading database ... 8948 files and directories currently installed.) Preparing to replace libncurses5 5.4-4 (using .../libncurses5_5.5-5_powerpc.deb) ... Unpacking replacement libncurses5 ... Setting up libncurses5 (5.5-5) ... Selecting previously deselected package libsepol1. (Reading database ... 8949 files and directories currently installed.) Unpacking libsepol1 (from .../libsepol1_1.14-2_powerpc.deb) ... Selecting previously deselected package libselinux1. Unpacking libselinux1 (from .../libselinux1_1.32-3_powerpc.deb) ... Selecting previously deselected package libkrb53. Unpacking libkrb53 (from .../libkrb53_1.4.4-7etch6_powerpc.deb) ... Selecting previously deselected package libedit2. Unpacking libedit2 (from .../libedit2_2.9.cvs.20050518-2.2_powerpc.deb) ... Selecting previously deselected package openssh-client. Unpacking openssh-client (from .../openssh-client_1%3a4.3p2-9etch3_powerpc.deb) ... Selecting previously deselected package openssh-blacklist. Unpacking openssh-blacklist (from .../openssh-blacklist_0.1.1_all.deb) ... Selecting previously deselected package openssh-server. Unpacking openssh-server (from .../openssh-server_1%3a4.3p2-9etch3_powerpc.deb) ... Selecting previously deselected package ssh. Unpacking ssh (from .../ssh_1%3a4.3p2-9etch3_all.deb) ... Setting up libsepol1 (1.14-2) ... Setting up libselinux1 (1.32-3) ... Setting up libkrb53 (1.4.4-7etch6) ... Setting up libedit2 (2.9.cvs.20050518-2.2) ... Setting up openssh-client (4.3p2-9etch3) ... Setting up openssh-blacklist (0.1.1) ... Setting up openssh-server (4.3p2-9etch3) ... Creating SSH2 RSA key; this may take some time ... Creating SSH2 DSA key; this may take some time ... Restarting OpenBSD Secure Shell server: sshd. Setting up ssh (4.3p2-9etch3) ... Reading Package Lists... Done Building Dependency Tree Reading extended state information Initializing package states... Done Reading task descriptions... Done KAGUYA:~#
玄箱/HGをリブートします。
SSH接続します。
アカウント(例): kanae
パスワード(例): -tanimoto-
SSHで接続できることを確認しました。
導入したSSHで接続できたら&color(magenta){telnet}は削除します。
管理者権限(管理者アカウント参照)で作業する必要があります。
KAGUYA:~# aptitude remove telnet telnetd[ENTER]
telnet削除画面(例)
Reading Package Lists... Done Building Dependency Tree Reading extended state information Initializing package states... Done Reading task descriptions... Done The following packages have been kept back: adduser apt apt-utils aptitude base-files base-passwd bash bsdmainutils bsdutils console-common console-data console-tools cpio cron debconf debconf-i18n debianutils dhcp-client dpkg dselect e2fslibs e2fsprogs fileutils findutils ftp gcc-3.3-base gettext-base grep groff-base gzip hostname ifupdown info initscripts iptables klogd libacl1 libattr1 libblkid1 libcomerr2 libconsole libdb1-compat libdb3 libdb4.2 libgcc1 libgdbm3 libldap2 liblocale-gettext-perl liblockfile1 liblzo1 libpam-modules libpam-runtime libpam0g libpcre3 libpopt0 libsasl2 libss2 libstdc++2.10-glibc2.2 libstdc++5 libtext-charwidth-perl libtext-iconv-perl libtext-wrapi18n-perl libuuid1 libwrap0 login logrotate make makedev man-db manpages modconf module-init-tools modutils mount nano ncurses-base ncurses-bin net-tools netbase netkit-ping nvi passwd pciutils perl perl-base perl-modules powerpc-utils procps psmisc sed shellutils sysklogd sysv-rc sysvinit tar tasksel tcpd telnetd textutils util-linux whiptail yaboot zlib1g The following packages will be REMOVED: telnet 0 packages upgraded, 0 newly installed, 1 to remove and 103 not upgraded. Need to get 0B of archives. After unpacking 197kB will be freed. Writing extended state information... Done (Reading database ... 9245 files and directories currently installed.) Removing telnet ... Reading Package Lists... Done Building Dependency Tree Reading extended state information Initializing package states... Done Reading task descriptions... Done KAGUYA:~#
telnetdを指定し忘れているときの画面なので表示は違ってくると思われ。
玄箱/HGをリブートします。
本作業後はtelnetと書いてあってもSSHで接続してください。
telnet接続します。
アカウント(例): kanae
パスワード(例): -tanimoto-
telnetでは接続できないことを確認します。
SSHで接続できることを再度、確認しておきましょう。
作業終了です。
以降の作業を行わない場合はtelnet切断します。
コメントはありません。 コメント/玄箱HGメモ/Debian/SSH導入?
Online: 2