Advertisement
Guest User

Untitled

a guest
May 26th, 2015
248
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. **Make and run**
  2.  
  3. ```bash
  4. apt-get source openssh-server
  5. apt-get install libssl-dev
  6. cd openssh-6.6p1
  7.  
  8. # Apply patch
  9. patch -p1 openssh/openssh-6.6p1/auth2-pubkey.c < auth2-pubkey.c.patch
  10.  
  11. ./configure
  12. make
  13.  
  14. # Create authorized_keys command
  15. vi /usr/local/sbin/ssh_authorized_keys
  16. # Copy from below
  17.  
  18. chmod 755 /usr/local/sbin/ssh_authorized_keys
  19.  
  20. # Run
  21. `pwd`/sshd -ddd
  22.  
  23. # Connect
  24. ssh -p 2222 -o IdentityFile=user.pub user@localhost id
  25.  
  26. # Build & install package
  27. apt-get install libssl-dev libwrap0-dev libpam-dev libgtk2.0-dev libedit-dev libselinux1-dev libck-connector-dev dh-autoreconf dh-systemd
  28.  
  29. dpkg-source --commit
  30. # Description: Add fingerprint argument to AuthorizedKeysCommand
  31. # This patch makes OpenSSH pass the public key fingerprint to the
  32. # AuthorizedKeysCommand, thereby allowing an efficient lookup.
  33.  
  34. dpkg-buildpackage -us -uc
  35. dpkg -i ../openssh-server_*.deb
  36. ```
  37.  
  38.  
  39. **Notes**
  40. ```bash
  41. # Create patch
  42. diff -Naur openssh.ORIG/openssh-6.6p1/auth2-pubkey.c openssh/openssh-6.6p1/auth2-pubkey.c > auth2-pubkey.c.patch
  43.  
  44. ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement