0
0

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.

【TeraTermマクロ】公開鍵認証のSSH自動ログイン(備忘)

Last updated at Posted at 2020-02-26

username = 'ec2-user'
hostname = 'aaa.bbb.ccc.ddd'
key_file = 'id_rsa' ← 秘密鍵ファイルを指定
passwdfile = 'passwd.dat'
portnum = '22'

getpassword passwdfile username userpasswd ← パスフレーズを暗号化ファイルとして保存

msg = hostname
strconcat msg ':portnum /ssh /auth=publickey /user=' ← 公開鍵認証を指定
strconcat msg username
strconcat msg ' /passwd='
strconcat msg userpasswd
strconcat msg ' /keyfile=' 
strconcat msg key_file
strconcat msg inputstr

connect msg

引用元
https://webkaru.net/linux/tera-term-macro-key-login/

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?