Pubkey connect from Dropbear SSH
越玩越開心,而家想用一部機用ssh remote send command 去另外一個 linux box 做野。
初時諗住兩邊一齊關掉wifi, 不過而家諗,我set 好一部機,另一部用remote 關未重方便!
不過dropbear 個setting 又有一點不同。
爬文後發現
https://forum.openwrt.org/viewtopic.php?id=4379
https://yorkspace.wordpress.com/2009/04/08/using-public-keys-with-dropbear-ssh-client/
加alias 入bash profile (安裝 bash )才可
初時諗住兩邊一齊關掉wifi, 不過而家諗,我set 好一部機,另一部用remote 關未重方便!
不過dropbear 個setting 又有一點不同。
爬文後發現
https://forum.openwrt.org/viewtopic.php?id=4379
https://yorkspace.wordpress.com/2009/04/08/using-public-keys-with-dropbear-ssh-client/
root@openwrt ~: dropbearkey -t rsa -f ~/.ssh/id_rsa
root@openwrt ~: dropbearkey -y -f ~/.ssh/id_rsa | grep “^ssh-rsa ” >> ~/pub_key
root@openwrt ~: dropbearkey -y -f ~/.ssh/id_rsa | grep “^ssh-rsa ” >> ~/pub_key
加alias 入bash profile (安裝 bash )才可
root@openwrt ~: vi ~/.bash_profile
那麼如何send command?
[...]
alias ssh='ssh -i /root/.ssh/id_rsa'
[...]
alias ssh='ssh -i /root/.ssh/id_rsa'
[...]
root@openwrt ~: ssh user@server 'send-command-to-server'
Comments