티스토리 뷰

container

docker ssh 설치

초보의 CHOMAN 2018.05.12 20:28


docker ssh 설치




: Docker 는 마이크로 서비스가 목적이므로 모든 서버는 반드시 sshd 가 설치될 이유는 없음

: 가상서버 환경 처럼 깔다보면 마이크로 서비스의 목적이 없어짐

: 일반 가상서버 사용하려면 가상화 이용 필요




openssh 설치



yum install openssh

 





/usr/sbin/sshd



Could not load host key: /etc/ssh/ssh_host_rsa_key
Could not load host key: /etc/ssh/ssh_host_ecdsa_key
Could not load host key: /etc/ssh/ssh_host_ed25519_key
sshd: no hostkeys available -- exiting.

 





ssh-keygen -t rsa1 -f /etc/ssh/ssh_host_key



Generating public/private rsa1 key pair.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /etc/ssh/ssh_host_key.
Your public key has been saved in /etc/ssh/ssh_host_key.pub.
The key fingerprint is:
SHA256:/GzJG16VN0cZ0rFerPglcN5eSYL46AWE76ZiOPLUmbs root@d6495ec74b8a
The key's randomart image is:
+---[RSA1 2048]---+
|        ..   ..o.|
|       .. . . .o+|
|        .o ....++|
|       . .+  =+=o|
|        S. o. *+*|
|    . o .*.. o =+|
|   ..+  o.B . . .|
| ..o o.. o +     |
|  o.oEo   o      |
+----[SHA256]-----+






ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key



Generating public/private rsa key pair.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /etc/ssh/ssh_host_rsa_key.
Your public key has been saved in /etc/ssh/ssh_host_rsa_key.pub.
The key fingerprint is:
SHA256:6kni1hV+1/3oVsNLtM3X89dAJAFiuNBLz9yLdyVe1g8 root@d6495ec74b8a
The key's randomart image is:
+---[RSA 2048]----+
|     . .o ....   |
|    . +. .  . .  |
|     o * .   o . |
|      o = . . E..|
|       .So o Bo+=|
|       .+ + + o*O|
|    ..o. o o  .+O|
|   ..+..      o.=|
|   .. o      o. .|
+----[SHA256]-----+

 





ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key



Generating public/private dsa key pair.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /etc/ssh/ssh_host_dsa_key.
Your public key has been saved in /etc/ssh/ssh_host_dsa_key.pub.
The key fingerprint is:
SHA256:Qu4ZSGRHz62RWVrvld+vGr78jOOcfSeLy3+itjxrTPg root@d6495ec74b8a
The key's randomart image is:
+---[DSA 1024]----+
|    o.o   o      |
|   o . o B .   . |
|    . . B . . o  |
|   . +   o . . ..|
|    . + S  ..   o|
|     . +  . .   .|
|      o    +.   .|
|           *EBo.+|
|           +^%B*.|
+----[SHA256]-----+

 





ssh-keygen -t ecdsa -f /etc/ssh/ssh_host_ecdsa_key



Generating public/private ecdsa key pair.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /etc/ssh/ssh_host_ecdsa_key.
Your public key has been saved in /etc/ssh/ssh_host_ecdsa_key.pub.
The key fingerprint is:
SHA256:Vik8tzUUt3PNPrknyipP2253bPmulvpfRkhN8kqw3Bw root@d6495ec74b8a
The key's randomart image is:
+---[ECDSA 256]---+
|            +.E .|
|       .   + * O.|
|        + + = B *|
|         = o + *.|
|        S .   ooo|
|       .       .o|
|          .   .+=|
|        .. +..++*|
|         o++*=o*=|
+----[SHA256]-----+

 





ssh-keygen -A



ssh-keygen: generating new host keys: ED25519

 





/usr/sbin/sshd



[root@d6495ec74b8a ssh]#

 


'container' 카테고리의 다른 글

The connection to the server localhost:8080 was refused - did you specify the right host or port?  (0) 2018.05.26
docker ssh 설치  (0) 2018.05.12
docker network (mac_vlan)  (0) 2018.05.10
docker 이미지 만들기  (0) 2018.05.10
docker command  (0) 2018.04.30
kubernetes 설치  (0) 2018.04.17
댓글
댓글쓰기 폼