すごくメモ帳

すごくほぼメモ帳ぐらいなブログ

2020-05-02から1日間の記事一覧

共通鍵暗号

共通鍵作成 openssl rand -out rand.txt -base64 32 # 共通鍵作成 暗号化するファイル echo hogehoge > hoge.txt 暗号化 openssl enc \ -e -aes128 -pbkdf2 \ -kfile rand.txt \ -in hoge.txt \ -out encrypted.hoge.txt 復号 openssl enc \ -d -aes128 -pbk…

GitHub 公開鍵認証

パソコン側 ssh-keygen cd .ssh chmod 600 id_rsa echo -e "\n\n" >> config echo Host github.com >> config echo -e " User git" >> config echo -e " Hostname github.com" >> config echo -e " IdentityFile ~/.ssh/id_rsa" >> config cat id_rsa.pub # …

SSH公開鍵認証の設定

SSH

サーバー側 ファイルの書き換え # /etc/ssh/sshd_config PasswordAuthentication no PubkeyAuthentication yes 実行 ssh-keygen cd .ssh cp id_rsa.pub authorized_keys chmod 600 authorized_keys chmod 700 . 再起動 公開鍵をコピー後に再起動する sudo se…