Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
prbinu authored Jan 20, 2019
1 parent 2a6a80d commit 12b4f6d
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# touch2sudo
<p align="center">
<img src="https://github.com/prbinu/touch2sudo/raw/master/images/t2s-2.png">
</p>

# touch2sudo

<p align="center">
<img src="https://github.com/prbinu/touch2sudo/raw/master/images/t2s-1.png">
</p>
Expand Down Expand Up @@ -37,7 +38,9 @@ git clone https://github.com/prbinu/touch2sudo

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.

4. Copy `touch2sudo` binary to `/usr/local/bin`
4. Install: Copy `touch2sudo` binary to `/usr/local/bin`

5. Run: `touch2sudo`


## Configure ssh-agent with touch2sudo
Expand Down Expand Up @@ -73,16 +76,24 @@ Start `ssh-agent`
$ export SSH_ASKPASS=/usr/local/bin/touch2sudo
$ export DISPLAY=0
$ eval $(ssh-agent)
Agent pid 56587
Agent pid 51863
$ ssh-add -L
The agent has no identities.
$ env | grep SSH
SSH_AGENT_PID=51863
SSH_AUTH_SOCK=/var/folders/hm/x1_38yz53td1jty5xgs39dxm2lm58d/T//ssh-JssXsflTuHrC/agent.51862
SSH_ASKPASS=/usr/local/bin/touch2sudo
$ ssh-add -c ~/.ssh/id_rsa_sudo
Identity added: /Users/binu/.ssh/id_rsa_sudo (binu@localhost)
$ ssh-add -c id_rsa_sudo
Identity added: id_rsa_sudo (binu[email protected])
The user must confirm each use of the key
```

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.
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).

For the complete information on end to end setup, please read: <TODO>
For the complete information on end to end setup, refer:
https://medium.com/@prbinu/touch2sudo-enable-remote-sudo-two-factor-authentication-using-mac-touch-id-df638b7da594

>

0 comments on commit 12b4f6d

Please sign in to comment.