linux生成多对秘钥并指定秘钥登录

1.生成秘钥对并指定秘钥对名称:

ssh-keygen -t rsa -f other -C "for other"

 

2.将other.pub公钥添加至要免密登录的服务器

 

3.使用指定other私钥登录远程服务器:

ssh -i ~/.ssh/other 124.202.149.13 -p36000

 

4.指定私钥远程scp

scp -P36000  -i ~/.ssh/other jiradb-2019-05-20.sql 124.202.149.13:/data/backup/jira/

 

posted @ 2019-05-20 11:26  Mr-Lee-long  阅读(1099)  评论(0编辑  收藏  举报