23 Commits

Author SHA1 Message Date
Josh Soref 8c1465e8c4 spelling: specific 2017-05-26 06:42:45 +00:00
Josh Soref 6eeeb86f8c spelling: parameter 2017-05-26 06:42:19 +00:00
Carlo Contavalli e6145bdf0a Connect ssh-add to the session tty, allow ssh-ident to run with no tty.
Background:
when the 'ssh' command is run, its stdin and stdout are often connected
to pipes. Think about rsync, git, scp, ...

ssh-ident internally calls ssh-add. If ssh-add does not have a terminal
for stdin and stdout, it can't read a password, so it invokes ssh-askpass,
and FAILS if ssh-askpass cannot be found.

Which is annoying for a few reasons:
- ssh-askpass becomes a requirement to use ssh-ident.
  ssh-add will fail if it can't find it :(
- ssh-askpass is invoked even in cases where, well, a terminal
  would normally be used.

In this change:
- when running ssh-add, connect its stdin and stdout to a suitable
  terminal.
- add code to detect a 'suitable' terminal.

The logic to determine what 'suitable' here is more complex than
it should be. Normally one would just check if stdin / stdout are
terminals. But this does not work here (see background).

So instead the code checks if 1) there is a /dev/tty, and 2) this
/dev/tty is an usable tty. 2) is necessary because in some cases
/dev/tty exists, is readable and writable, it is a character device,
but using it as a terminal returns ENXIO or ENODEV.

So the detection code does a 'noop' tty ioctl, in order to detect
ENXIO and ENODEV. If no error is returned, then it is a dvice.

Terminals are black magic.
This (hopefully) closes #29, and closes #32.
2016-11-26 08:06:03 -08:00
Carlo Contavalli 9f3b145cf7 Fix steps to build a .deb file in documentation. Closes #27, finally.
Thanks to github.com/irnc for opening the bug and providing the fixed
instructions.
2016-11-26 06:33:32 -08:00
Carlo Contavalli 728d34bf44 Fix documentation to use VARIABLE = ASSIGNMENT rather than "DICT":
"ASSIGNMENT" syntax everywhere.

For some reason, when I wrote the documentation I was assuming a dict
was used for configuration parameters. Closes #20.
2016-11-26 06:30:56 -08:00
Adam Glauser c5f4f8b5b1 Fix config file syntax in README
The syntax for the SSH_DEFAULT_OPTIONS setting is not correct in the
README file, and causes a runtime error as is.
2016-07-22 12:07:35 -04:00
Carlo Contavalli 59ffe3a64c Updated README, after latest changes to the docstrings. 2016-04-21 10:16:37 -07:00
Black 77d2f3f382 Automatically detect the ssh/scp/... binary to use 2016-03-20 17:08:57 +01:00
Carlo Contavalli bc00a5919b Updated CREDITS and README file. 2016-01-20 22:22:39 -08:00
Black 9682500d7d Added VERBOSITY option to control the output verbosity 2015-01-27 20:49:32 +01:00
Carlo Contavalli d111e2fbc5 Update documentation to mention the 7200s life time for keys, by
default.
2014-11-07 18:48:04 -08:00
Carlo Contavalli e93963de5a Provide simple installation instrucitons. 2014-11-07 18:42:22 -08:00
Carlo Contavalli 3cdd9a4fe2 Remove whitespaces at the end of line, move "Requirements" section to
ssh-ident, where it was supposed to be to begin with, move from future
... after the file docstring (otherwise pydoc doesn't generate / show
the documentation correctly), and update the README with pydoc ssh-ident
> README.
2014-10-09 21:52:13 -07:00
Carlo Contavalli 0f53957696 Added requirements section in README. 2014-10-09 21:46:09 -07:00
Carlo Contavalli c79954295f Updated README. 2014-06-23 00:58:16 -07:00
Carlo Contavalli d04467f8f3 Update README file as per last commit. 2014-05-02 09:05:10 -07:00
Carlo Contavalli 63eb65f9d7 Better README and docstrings in ssh-ident. 2014-05-02 08:57:36 -07:00
Carlo Contavalli a1eb06f38b Updated documentation. 2013-03-22 18:27:53 -07:00
Carlo Contavalli 3f868cbdca Updated README file. 2013-03-22 10:11:14 -07:00
Carlo Contavalli d24a63ddd0 Added ability to specify per-agent options. 2013-02-06 00:35:05 -08:00
Carlo Contavalli 3a03ee233c Expanded explanation. 2013-02-06 00:27:47 -08:00
Carlo Contavalli bd384ed430 Added docstrings, updated README file. 2013-02-06 00:22:35 -08:00
Carlo Contavalli 3a8625c659 Added README, generated with pydoc ssh > README. 2013-02-04 11:03:27 -08:00