Score:0

How can I automate initial authentication between devices?

cn flag

I have a set of devices with static ip addresses that I want to create ssh tunnels between in order to share files. I want this to happen behind the scenes so users don't have to worry about establishing/authenticating these connections. I have control over these devices' base images.

The obvious solution to me is to generate ssh keys on each device and use public key authentication. The problem is that in order to share the keys, I need to go through password authentication first, which requires some input from a user.

I've looked at sshpass to automate password authentication, but that means I need to store my login info in my base image, and I'm not sure how I can do that safely, if at all.

At this point, I'm at a loss for what to investigate next, and am looking for a solution or suggestions.

Klamber avatar
ru flag
Make the ssh keys without password ?
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.