ubuntu@instance-20230626-2355:~$ timedatectl Local time: Tue 2023-06-27 00:32:32 KST Universal time: Mon 2023-06-26 15:32:32 UTC RTC time: Mon 2023-06-26 15:32:32 Time zone: Asia/Seoul (KST, +0900) System clock synchronized: yes NTP service: active RTC in local TZ: no
굳이 왜 이렇게까지 하냐면.... ^^
예전에 이렇게 만들어놓고 잊어먹어서.... 접속을 하지 않다가.... 결국은 삭제를 당했기에....
with smtplib.SMTP_SSL("smtp.gmail.com", 465) as server: server.login(sender_email, app_password) server.sendmail(sender_email, receiver_email, message.as_string())
DEPRECATED: The legacy builder is deprecated and will be removed in a future release. Install the buildx component to build images with BuildKit: https://docs.docker.com/go/buildx/
- 여기에서는 가장 간단하게 그냥 무조건 기본값으로 그냥 막 엔터만 쳐서 생성하도록 하자.
(master)$ ssh-keygen
Generating public/private rsa key pair. Enter file in which to save the key (/home/whatwant/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/whatwant/.ssh/id_rsa Your public key has been saved in /home/whatwant/.ssh/id_rsa.pub The key fingerprint is: SHA256:MtIQVARuKNcksL0D3beQ2aMMbMYfcdybNFVZVRGgDnQ whatwant@master The key's randomart image is: +---[RSA 3072]----+ |....*=+. o.E.+o+*| | * B B. = . o | |+ @ @ +. = . | | * * B oo o | | o = = S . | | . . o | | | | | | | +----[SHA256]-----+
③ copy key
- ssh-key 인증을 통해 master에서 worker로 접속할 수 있도록 하기 위한 과정이다
- 명령어에 있는 IP는 worker들의 IP이다. 각자 상황에 맞춰 사용하면 된다.
- 자기 자신(master)에도 등록을 하자.
(master)$ ssh-copy-id 192.168.100.151
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/home/whatwant/.ssh/id_rsa.pub" The authenticity of host '192.168.100.151 (192.168.100.151)' can't be established. ED25519 key fingerprint is SHA256:Nu127IO/HdpFbO3HvWB8J61ZdhGjXpYDBSb3qg3rSY8. This key is not known by any other names Are you sure you want to continue connecting (yes/no/[fingerprint])? yes /usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed /usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys whatwant@192.168.100.151's password:
Number of key(s) added: 1
Now try logging into the machine, with: "ssh '192.168.100.151'" and check to make sure that only the key(s) you wanted were added.