|
1 | | -# touch2sudo |
2 | 1 | <p align="center"> |
3 | 2 | <img src="https://github.com/prbinu/touch2sudo/raw/master/images/t2s-2.png"> |
4 | 3 | </p> |
5 | 4 |
|
| 5 | +# touch2sudo |
| 6 | + |
6 | 7 | <p align="center"> |
7 | 8 | <img src="https://github.com/prbinu/touch2sudo/raw/master/images/t2s-1.png"> |
8 | 9 | </p> |
@@ -37,7 +38,9 @@ git clone https://github.com/prbinu/touch2sudo |
37 | 38 |
|
38 | 39 | 3. Archive: (*Product -> Archive -> Distribute Content -> Build Products -> Next -> Save*) Save the archive folder. The touch2sudo executable will be in the `<ArchiveDir>/Product/usr/local/bin` path. |
39 | 40 |
|
40 | | -4. Copy `touch2sudo` binary to `/usr/local/bin` |
| 41 | +4. Install: Copy `touch2sudo` binary to `/usr/local/bin` |
| 42 | + |
| 43 | +5. Run: `touch2sudo` |
41 | 44 |
|
42 | 45 |
|
43 | 46 | ## Configure ssh-agent with touch2sudo |
@@ -73,16 +76,24 @@ Start `ssh-agent` |
73 | 76 | $ export SSH_ASKPASS=/usr/local/bin/touch2sudo |
74 | 77 | $ export DISPLAY=0 |
75 | 78 | $ eval $(ssh-agent) |
76 | | -Agent pid 56587 |
| 79 | +Agent pid 51863 |
| 80 | +
|
| 81 | +$ ssh-add -L |
| 82 | +The agent has no identities. |
| 83 | +
|
| 84 | +$ env | grep SSH |
| 85 | +SSH_AGENT_PID=51863 |
| 86 | +SSH_AUTH_SOCK=/var/folders/hm/x1_38yz53td1jty5xgs39dxm2lm58d/T//ssh-JssXsflTuHrC/agent.51862 |
| 87 | +SSH_ASKPASS=/usr/local/bin/touch2sudo |
77 | 88 |
|
78 | | -$ ssh-add -c ~/.ssh/id_rsa_sudo |
79 | | -Identity added: /Users/binu/.ssh/id_rsa_sudo (binu@localhost) |
| 89 | +$ ssh-add -c id_rsa_sudo |
| 90 | +Identity added: id_rsa_sudo (binu[email protected]) |
80 | 91 | The user must confirm each use of the key |
81 | 92 | ``` |
82 | 93 |
|
83 | 94 | To make it work, on remote server you need to configure `pam-ssh-agent-auth` - a PAM module that does SSH key authentication for sudo. |
84 | 95 | pam-ssh-agent-auth is based on SSH *agent-forwarding* feature that allow the PAM module to authenticate sudo command using key cached in ssh-agent running on your workstation (Mac). |
85 | 96 |
|
86 | | -For the complete information on end to end setup, please read: <TODO> |
| 97 | +For the complete information on end to end setup, refer: |
| 98 | +https://medium.com/@prbinu/touch2sudo-enable-remote-sudo-two-factor-authentication-using-mac-touch-id-df638b7da594 |
87 | 99 |
|
88 | | -> |
|
0 commit comments