1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

sshを公開鍵認証でログインするまで

Posted at

ローカルでの作業

# keyの生成
ssh-keygen -t rsa

# 公開鍵のリモートに配置
scp ~/.ssh/id_rsa.pub hoge@hostname:/home/hoge/

# ssh config の設定
vi ~/.ssh/config

# 環境に合わせて記述
Host hoge
    HostName     hostname
    IdentityFile ~/.ssh/id_rsa
    User         username

リモートでの作業

cat ~/id_rsa_pub >> ~/.ssh/authorized_keys

sshでアクセス

ssh hoge
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?