{"id":17145949,"url":"https://github.com/foxcpp/ttyprompt","last_synced_at":"2025-12-17T02:30:15.194Z","repository":{"id":57582954,"uuid":"129265644","full_name":"foxcpp/ttyprompt","owner":"foxcpp","description":"Ask for passwords on different tty to combat X11 keyloggers","archived":false,"fork":false,"pushed_at":"2018-09-08T20:59:30.000Z","size":38,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-13T07:34:25.304Z","etag":null,"topics":["gnupg","linux-security","pinentry"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/foxcpp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-04-12T14:39:13.000Z","updated_at":"2024-10-10T18:09:32.000Z","dependencies_parsed_at":"2022-09-03T04:11:36.476Z","dependency_job_id":null,"html_url":"https://github.com/foxcpp/ttyprompt","commit_stats":null,"previous_names":["hkettu/ttyprompt"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foxcpp%2Fttyprompt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foxcpp%2Fttyprompt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foxcpp%2Fttyprompt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foxcpp%2Fttyprompt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/foxcpp","download_url":"https://codeload.github.com/foxcpp/ttyprompt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239690076,"owners_count":19681034,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gnupg","linux-security","pinentry"],"created_at":"2024-10-14T21:07:20.380Z","updated_at":"2025-12-17T02:30:15.159Z","avatar_url":"https://github.com/foxcpp.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"ttyprompt\n==========================\n\nAsk for passwords on separate TTY to combat X11 keyloggers.\n\nYes, you may use Wayland but some people have reasons to stay with X.Org.\nIf you have no idea what Wayland is - check it out and consider switching to it\nbecause this program is actually a dirty hack.\n\nInstallation\n--------------\n\n**Note:** ttyprompt requires special permissions (file capabilities) to be set\non executable, plain `go get` will not set them.\n\nInstall Golang toolchain (https://golang.org/dl).\n\nIncluded Makefile will take care of everything else:\n```\n$ make\n# make install\n```\n\nAs an additional security measure you may want to run ttyprompt as a separate\nuser which will be only one member of ttyprompt:\n```\n# useradd -lMNr -s /sbin/nologin -g ttyprompt ttyprompt\n```\nTo always run ttyprompt using this user account:\n```\n# chown ttyprompt /usr/local/bin/ttyprompt\n# chmod u+s /usr/local/bin/ttyprompt\n```\n\n#### Build tags\n\n| Tag           | Meaning                              |\n| ------------- | ------------------------------------ |\n| `nomlock`     | Don't lock entire memory of process. |\n| `nopinentry`  | Disable pinentry mode support.       |\n\nUsage\n--------------\n\n#### Simple Mode\n\nJust run ttyprompt, entered password will be written to stdout.\n\nThere are some options you may want to use to customize dialog, see \n`ttyprompt --help`.\n\n#### Polkit Agent Mode \n\nNot implemeneted yet (issue #1).\n\n#### ssh-askpass\n\nSet `SSH_ASKPASS` environment variable to `/usr/local/bin/ttyprompt-ssh`.\n```sh\nexport SSH_ASKPASS=/usr/local/bin/ttyprompt-ssh\n```\n\n**Note:** Check out https://unix.stackexchange.com/a/83991 if you want to\nalways use ttyprompt for SSH.\n\n**Note 2:** `setsid` trick breaks group-only execution mode set on ttyprompt\nbinary and scripts. To use it you should run the following command first:\n```\nchmod o+x /usr/local/bin/*ttyprompt*\n```\n\n\n#### sudo\n\n`ttyprompt-ssh` works for sudo too:\n```sh\nexport SUDO_ASKPASS=/usr/local/bin/ttyprompt-ssh\n```\n\nThen use `sudo -A` instead of just `sudo`.\n\n\n#### Pinentry Emulation Mode (GnuPG passphrase prompt)\n\nAdd `pinentry-program /usr/local/bin/pinentry-ttyprompt` to \n`.gnupg/gpg-agent.conf`. Make sure to restart gpg-agent: \n`gpgconf --kill gpg-agent`.\n\nSecurity issues\n-----------------\n\nContact me privately via email (`fox.cpp at disroot dot org`). Use PGP\nencryption if possible.\n\nLicense\n---------\n\nAs usual: ttyprompt is published under the terms of the MIT license. You can do\nanything as long as you keep copyright notice.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoxcpp%2Fttyprompt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffoxcpp%2Fttyprompt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoxcpp%2Fttyprompt/lists"}