Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- **Make and run**
- ```bash
- apt-get source openssh-server
- apt-get install libssl-dev
- cd openssh-6.6p1
- # Apply patch
- patch -p1 openssh/openssh-6.6p1/auth2-pubkey.c < auth2-pubkey.c.patch
- ./configure
- make
- # Create authorized_keys command
- vi /usr/local/sbin/ssh_authorized_keys
- # Copy from below
- chmod 755 /usr/local/sbin/ssh_authorized_keys
- # Run
- `pwd`/sshd -ddd
- # Connect
- ssh -p 2222 -o IdentityFile=user.pub user@localhost id
- # Build & install package
- apt-get install libssl-dev libwrap0-dev libpam-dev libgtk2.0-dev libedit-dev libselinux1-dev libck-connector-dev dh-autoreconf dh-systemd
- dpkg-source --commit
- # Description: Add fingerprint argument to AuthorizedKeysCommand
- # This patch makes OpenSSH pass the public key fingerprint to the
- # AuthorizedKeysCommand, thereby allowing an efficient lookup.
- dpkg-buildpackage -us -uc
- dpkg -i ../openssh-server_*.deb
- ```
- **Notes**
- ```bash
- # Create patch
- diff -Naur openssh.ORIG/openssh-6.6p1/auth2-pubkey.c openssh/openssh-6.6p1/auth2-pubkey.c > auth2-pubkey.c.patch
- ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement