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/