I have an IoT device I'm working on. I need to be able to reliably SSH into it once it's out in the field since I won't have physical access if I need to modify any files. I have a startup script that uses the following line to open an SSH tunnel:
sshpass -p 'XXXXXX' ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -fN -R 7000:localhost:22 user@server-address.com
This is successful at opening a tunnel, but if power is interrupted I can no longer open a tunnel without changing port number.
Here is the output with -vvv:
debug1: Next authentication method: publickey
debug1: Trying private key: /root/.ssh/id_rsa
debug3: no such identity: /root/.ssh/id_rsa
debug1: Trying private key: /root/.ssh/id_dsa
debug3: no such identity: /root/.ssh/id_dsa
debug1: Trying private key: /root/.ssh/id_ecdsa
debug3: no such identity: /root/.ssh/id_ecdsa
debug2: we did not send a packet, disable method
debug3: authmethod_lookup password
debug3: remaining preferred: ,password
debug3: authmethod_is_enabled password
debug1: Next authentication method: password
debug3: packet_send2: adding 48 (len 61 padlen 19 extra_pad 64)
debug2: we sent a password packet, wait for reply
debug1: Authentications that can continue: publickey,password
Permission denied, please try again.
I'm running Debian on an Intel Edison.