Shortcuts Advise

I have a few shortcuts created that I use to do tasks on many servers that give me a drop down to select the server I require.

The problem I have is all these servers have different passwords to I have to input the password depending on what I am connecting to when the ssh session starts.

Is there anyway of preserving all the passwords and assigning these to the dropdown so I don’t get asked when the ssh session kicks off.

Wouldn’t it be possible to use certificate-based login?

Agreed with @vco1, you’re best bet would be to have ssh keys setup on the servers where you can store the private key on your iOS device, either in the file system or in something like Data Jar. This would require some setup on the servers to allow key based authentication and placing the appropriate public keys but assuming that happens, use the toggle highlighted in my screenshot.

The problem with that is there are so many server and each person has at least 2 iOS devices. If I could copy an existing ssh key to us that’s already authorised it would be a good to go plan

Why not store the passwords in data jar and pick the one based on the selection?

Just from a general security standpoint, you wouldn’t want to copy/share private keys. The proper way would be for each device (or at least each user) to generate its own private/public key pair, then push the public key to each server. That way, if an iOS device is stolen, you just remove the public key from the server, and also if a new server is brought online, you just clone the authorized keys.

If you want to manage by passwords, then what @JKoopmans suggests also works. Data Jar is a great way to store information outside of the shortcut. Still not the most secure, but definitely better than embedding in the shortcut.

Based on the use case you’re suggesting, I’d recommend going the key route since it sounds like you’re executing basic commands or triggering scripts on these servers. Passwords make more sense for full on terminal interaction