用語解説:Console - 操作卓
☞ OKITAC 4300
(情報処理技術遺産)
# ls /etc/ssh/*host* /etc/ssh/ssh_host_ecdsa_key /etc/ssh/ssh_host_ed25519_key.pub /etc/ssh/ssh_host_ecdsa_key.pub /etc/ssh/ssh_host_rsa_key /etc/ssh/ssh_host_ed25519_key /etc/ssh/ssh_host_rsa_key.pubSSHで使用される暗号アルゴリズム
方式 | 概要 |
---|---|
RSA | 桁数が大きい合成数の素因数分解を利用(Ver.1 rsa1は脆弱なため原則利用しない) |
MD5 | 暗号学的ハッシュ関数のひとつハッシュ値は128bit(脆弱性が報告されている) |
DSA | 離散対数問題を利用したデジタル署名 |
ECDSA | DSAに楕円曲線暗号を組み合わせたもの |
Ed25519 | ツイストエドワーズ曲線を用いた電子署名 |
$ ssh-keygen Generating public/private rsa key pair. Enter file in which to save the key (/home/student/.ssh/id_rsa): Created directory '/home/student/.ssh'. Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/student/.ssh/id_rsa. Your public key has been saved in /home/student/.ssh/id_rsa.pub. The key fingerprint is: SHA256:MhoxIlMyUSE/HhJhzTajMtopAIKNMBVyy5Gc4FPj3co student@cent79 The key's randomart image is: +---[RSA 2048]----+ |#@@B | |B%BOo . | |*oX.=. . | |+*.+.o. | |+o...Eo S | |o o o o | | . . | | | | | +----[SHA256]-----+ $ ls -l .ssh 合計 8 -rw------- 1 student student 1766 7月 1 08:48 id_rsa -rw-r--r-- 1 student student 396 7月 1 08:48 id_rsa.pub以下は scp によるリモートファイルコピーの例。
$ scp typescript ycos2@ycos2.sakura.ne.jp:work/ssh-keygen.log The authenticity of host 'ycos2.sakura.ne.jp (112.78.112.194)' can't be established. ECDSA key fingerprint is SHA256:PjOls/PGCbFx0s5mpxQkS9Q6HkaatibGOS6kOnN3KzQ. ECDSA key fingerprint is MD5:a5:1e:9c:9d:ae:ee:73:97:31:7c:d7:71:5f:58:99:a1. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'ycos2.sakura.ne.jp,112.78.112.194' (ECDSA) to the list of known hosts. ycos2@ycos2.sakura.ne.jp's password: typescript 100% 1174 40.0KB/s 00:00SSH 補足
$ cat /etc/hosts.allow sshd: 10.20.141.6 $ cat /etc/hosts.deny sshd: ALL $ ssh 127.0.0.1 ssh_exchange_identification: read: Connection reset by peer # サーバー側から遮断されている $ ssh student@10.20.141.6 student@10.20.141.6's password: Last login: Mon Mar 25 21:12:19 2019 from h006.s141.la.netTCP Wrapper は非常に簡単に利用できるが、libwrap の組込みが必要である。
# ldd /usr/sbin/sshd | grep libwrap libwrap.so.0 => /lib64/libwrap.so.0 (0x00007f1152b3c000) $ rpm -qf /usr/lib64/libwrap.so.0 tcp_wrappers-libs-7.6-77.el7.x86_64
libwrap を組み込んだプログラム
プログラム | 概要 |
---|---|
sshd | リモートコンソール |
auditd | 監査ログ管理 |
rpcbind | RCP ポートマッパー |
rpcinfo | RCP 利用状況 |
rpc.rquotad | NFS クォータ |
rpc.statd | RCP ステータス |
exportfs | NFS ディレクトリ表示 |
rpc.mountd | NFS マウント |