pcdshub / engineering_tools

A repository of scripts, configuration useful for the PCDS team
Other
4 stars 26 forks source link

ENH/WIP: add sshkey setup helper #191

Open tangkong opened 4 months ago

tangkong commented 4 months ago

Description

An attempt at guiding a user through adding an ssh key to their account. A very untested script at the moment, I'm a bit reluctant to wipe my own key / agent settings to test it fully.

Needs a lot of work, but I figured I'd toss it up here for visibility's sake

Needs

Motivation and Context

Inspired by Zach's ioc-deploy efforts.

Uses a combination of subprocess.run for commands that don't interact, and pexpect.spawn for interactive commands. (Many commands don't print to stdout, but rather directly to the tty, I think)

Initially attempted to use click to make the process more interactive, but click's involvement decreased as development continued.

How Has This Been Tested?

Not really

Where Has This Been Documented?

This PR.