User Tools

Site Tools


doc:howto:autossh

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
doc:howto:autossh [2017/10/13 17:55]
tmomas
doc:howto:autossh [2017/10/13 18:03] (current)
tmomas Applied proper formatting to Installation steps
Line 7: Line 7:
  
 Alternative packages: Alternative packages:
 +
   * [[https://​github.com/​hewenhao2008/​autossh-openwrt]]   * [[https://​github.com/​hewenhao2008/​autossh-openwrt]]
   * [[https://​github.com/​aa65535/​openwrt-autossh]]   * [[https://​github.com/​aa65535/​openwrt-autossh]]
- 
  
 [[doc:​uci:​sshtunnel|sshtunnel]] is a simpler, functionally-identical package. (depends on OpenSSH so higher disk space requirements) [[doc:​uci:​sshtunnel|sshtunnel]] is a simpler, functionally-identical package. (depends on OpenSSH so higher disk space requirements)
Line 18: Line 18:
  
 ===== Installation ===== ===== Installation =====
-Install autossh +  - Install autossh <​code>​opkg install autossh</​code>​ 
-<​code>​ +  ​- ​Create a key <​code>​dropbearkey -t rsa -f /​etc/​dropbear/​id_rsa</​code>​ 
-opkg install autossh +    * On //**LEDE** 17.01.x// use <​code>​dropbearkey -t rsa -f /​root/​.ssh/​id_dropbear</​code>​ 
-</​code>​ +  ​- ​''​dropbearkey''​ will print the public key, starting with ''​ssh-rsa''​. 
- +    * You can reprint the key using <​code>​dropbearkey -y -f /​etc/​dropbear/​id_rsa</​code>​ 
-Create a key +    ​* ​or you can write it to a file (e.g. ''/​tmp/​pubkey''​) <​code>​dropbearkey -y -f /​etc/​dropbear/​id_rsa | grep ssh-rsa > /​tmp/​pubkey</​code>​ 
-<​code>​ +  ​- ​Add the key to the ''​authorized_keys''​ file on your server, e.g. copy pubkey file to the server and do <​code>​cat pubkey >> ~/​.ssh/​authorized_keys</​code>​
-dropbearkey -t rsa -f /​etc/​dropbear/​id_rsa +
-</​code>​ +
- +
-  ​* On //**LEDE** 17.01.x // use +
- +
-         dropbearkey -t rsa -f /​root/​.ssh/​id_dropbear +
- +
-''​dropbearkey''​ will print the public key, starting with ''​ssh-rsa''​. You can reprint the key using  +
-<​code>​ +
-dropbearkey -y -f /​etc/​dropbear/​id_rsa +
-</​code>​ +
-or write it to a file (e.g. ''/​tmp/​pubkey''​) +
-<​code>​ +
-dropbearkey -y -f /​etc/​dropbear/​id_rsa ​ | grep ssh-rsa > /tmp/pubkey +
-</​code>​ +
- +
-Add the key to the ''​authorized_keys''​ file on your server+
-E.g. Copy pubkey file to the server and do  +
-<​code>​ +
-cat pubkey >> ~/​.ssh/​authorized_keys +
-</​code>​+
  
 ===== Configuration ===== ===== Configuration =====
doc/howto/autossh.txt · Last modified: 2017/10/13 18:03 by tmomas