Commit Graph

439 Commits

Author SHA1 Message Date
Philip Hands 2709809fd6
fixup! if -s & -p specified, mention 'sftp -P' on
success

SSH-Copy-ID-Upstream: 32686e7c65b4fa2846e474d3315102dfa0f043b0
2023-05-25 18:24:58 +10:00
Darren Tucker 204e0bf051
Make ssh-copy-id(1) consistent with OpenSSH.
This makes the ssh-copy-id man page more consistent with the rest of the
OpenSSH man pages:
- new sentence, new line
- no sentences >80
- N.B. -> NB
- zap unused .Pp
- zap trailing whitespace

Report from Debian via mindrot bz#3331, diff from jmc at openbsd.org.

SSH-Copy-ID-Upstream: d8974cfb6242316460ed22a1ccc662800a50c5d3
2023-05-25 18:24:55 +10:00
Philip Hands 9de79df66d
if -s & -p specified, mention 'sftp -P' on success
This was inspired by this:
 https://github.com/openssh/openssh-portable/pull/321
but I thought that it was better to not do the sed patching.

BTW the reason one can get away with using $SSH_OPTS throughout, despite
the lowercase -p in there, even if sftp is in use, is that the sftp call
is using the already-established ssh master connection, so the port was
passed to the earlier ssh.

SSH-Copy-ID-Upstream: 1c124d9bfafdbe28a00b683367ebf5750ce12eb2
2023-05-25 18:24:53 +10:00
Philip Hands 801cda54c0
drop whitespace
SSH-Copy-ID-Upstream: e604fae1cdee35c18055d35dcec530cf12ef00ad
2023-05-25 18:24:50 +10:00
Philip Hands 288482f536
make -x also apply to the target script
SSH-Copy-ID-Upstream: 3c4214704f427bd0654adf9b0fc079253db21cf4
2023-05-25 18:24:47 +10:00
Philip Hands b79e7b88ed
add -t option to specify the target path
Allow the default target path (.ssh/authorized_files) to be over-riden

This was inspired by this MR from Panagiotis Cheilaris <philaris@cs.ntua.gr>

 https://gitlab.com/phil_hands/ssh-copy-id/-/merge_requests/8

SSH-Copy-ID-Upstream: a942a0e076874adb6d8b2f0fb76d6c7918190fcd
2023-05-25 18:24:45 +10:00
Carlos Rodríguez Gili 914f4ad138
Fix test error for /bin/sh on Solaris 10 and older
On Solaris 10 and older targets /bin/sh is not POSIX-compliant.
Test -z `...` fails with error 'sh: test: argument expected'.
Using quotes around backticks fixes this and doesn't break
POSIX compatibility.

SSH-Copy-ID-Upstream: 98394072a3f985b2650c1e8eab2fef84e38cc065
2023-05-25 18:24:42 +10:00
Jakub Jelen bd382dca31
Remove outdated comment
The commit b068122 removed the code dropping the trailing colon, but the comment stayed leaving the code confusing for future readers

SSH-Copy-ID-Upstream: 930d39f238117cd53810240ec989d0356aa1c1f6
2023-05-25 18:24:39 +10:00
Darren Tucker bdcaf79390
Special case OpenWrt instead of Dropbear.
OpenWrt overrides the location of authorized_keys for root.  Currently we
assume that all Dropbear installations behave this way, which is not the
case.  Check for OpenWrt and root user before using that location instead
of assuming that for all Dropbear servers.  Prompted by Github PR#250.

SSH-Copy-ID-Upstream: 0e1f5d443a9967483c33945793107ae3f3e4af2d
2023-05-25 18:24:37 +10:00
Philip Hands cf84498f67
ssh-copy-id: add -x option (for debugging)
This option causes the ssh-copy-id to run with set -x

SSH-Copy-ID-Upstream: a0ee367ea8c0a29c8b4515245e408d2d349e7844
2023-05-25 18:24:32 +10:00
Philip Hands b4a1efdcb8
update copyright notices
SSH-Copy-ID-Upstream: c284ed33b361814ea48ff68cbd01ca525b2bf117
2023-05-25 18:24:25 +10:00
Damien Miller 1dba63eb10
crank version 2023-03-16 08:27:54 +11:00
Damien Miller 6dfb65de94
crank versions in RPM specs 2023-02-02 23:21:54 +11:00
Damien Miller f059da2b29
crank versions in RPM spec files 2022-10-04 01:45:41 +11:00
Damien Miller 94eb6858ef update version numbers for release 2022-04-06 10:47:48 +10:00
Damien Miller 62a2d4e50b update versions in preparation for 8.9 release 2022-02-16 16:26:17 +11:00
Damien Miller a5ab488234 remove built-in support for md5crypt()
Users of MD5-hashed password should arrange for ./configure to link
against libxcrypt or similar. Though it would be better to avoid use
of MD5 password hashing entirely, it's arguably worse than DEScrypt.

feedback and ok dtucker@
2021-10-28 16:16:13 +11:00
Damien Miller 8acaff41f7 update version numbers for release 2021-09-26 22:16:36 +10:00
Darren Tucker d83ec9ed99 Remove obsolete Redhat PAM config and init script. 2021-08-20 15:39:05 +10:00
Damien Miller 5450606c8f update version numbers 2021-08-20 13:59:43 +10:00
Damien Miller 2fb25ca11e crank version in README and RPM spec files 2021-04-16 13:53:02 +10:00
Damien Miller d5d6b7d76d perform report_failed_grab() inline 2021-04-10 18:45:00 +10:00
Damien Miller ea996ce2d0 dedicated gnome-ssk-askpass3 source
Compatibility with Wayland requires that we use the gdk_seat_grab()
API for grabbing mouse/keyboard, however these API don't exist in
Gtk+2.

This branches gnome-ssk-askpass2.c => gnome-ssk-askpass3.c and
makes the changes to use the gdk_seat_grab() instead of grabbing
mouse/focus separately via GDK.

In the future, we can also use the branched file to avoid some
API that has been soft-deprecated in GTK+3, e.g. gtk_widget_modify_fg
2021-04-10 18:22:57 +10:00
Damien Miller 57ed647ee0 polish whitespace for portable files 2021-04-03 17:47:37 +11:00
Damien Miller 71241fc05d gnome-ssh-askpass3 is a valid target here 2021-03-29 15:14:25 +11:00
Damien Miller 67a8bb7fe6 update RPM spec version numbers 2021-03-02 21:29:54 +11:00
Philip Hands 476ac8e9d3 tidy the $INSTALLKEY_SH code layout a little
SSH-Copy-ID-Upstream: 78178aa5017222773e4c23d9001391eeaeca8983
2021-02-26 01:06:15 +11:00
Jakub Jelen 983e05ef3b if unable to add a missing newline, fail
SSH-Copy-ID-Upstream: 76b25e18f55499ea9edb4c4d6dc4a80bebc36d95
2021-02-26 01:06:15 +11:00
Philip Hands 3594b3b015 use $AUTH_KEY_DIR, now that we have it
since that was a change made since jjelen's commit was written

also, quote the variables

SSH-Copy-ID-Upstream: 588cd8e5cbf95f3443d92b9ab27c5d73ceaf6616
2021-02-26 01:06:15 +11:00
Jakub Jelen 333e25f7bc restorecon the correct directory
if using different path for authorized_keys file

SSH-Copy-ID-Upstream: 791a3df47b48412c726bff6f7b1d190721e65d51
2021-02-26 01:06:15 +11:00
Philip Hands e545d94b71 shift contents of long $() into filter_ids()
This was prompted by the fact that posh does not deal with $()
that contains comments where the comment includes an odd number
of single-quotes. It seems to get befuddled into trying to find
the matching quote.
Regardless, making a function for filtering the unneeded ids
seems much neater than avoiding apostrophes,
so that's what I've done.

SSH-Copy-ID-Upstream: 3dab3366a584427045c8a690a93282f02c09cf24
2020-10-13 12:45:05 +11:00
Philip Hands fd36017459 combine if/elif to avoid duplication of the action
SSH-Copy-ID-Upstream: 42aeb1cc53d3f7f6e78edc210fb121fda0834914
2020-10-13 12:45:05 +11:00
Philip Hands f7c3a39b01 shellcheck tidyage
SSH-Copy-ID-Upstream: 5b08f840e78ac544288b3983010a1b0585e966fd
2020-10-13 12:45:05 +11:00
Philip Hands 108676c3f2 tidy up test of $SCRATCH_DIR creation
SSH-Copy-ID-Upstream: 2d8b22d96c105d87743ffe8874887b06f8989b93
2020-10-13 12:44:38 +11:00
Philip Hands a9c9e91a82 add -s flag: to install keys via SFTP
This is prompted by:

 https://bugzilla.mindrot.org/show_bug.cgi?id=3201

Thanks go to Matthias Blümel for the idea, and the helpful patch, from
which this patch grew.

SSH-Copy-ID-Upstream: f7c76dc64427cd20287a6868f672423b62057614
2020-10-13 11:52:47 +11:00
Philip Hands ce941c75ea un-nest $() to make ksh cheerful 2020-10-03 09:26:00 +10:00
Philip Hands 18ea5f4b88 ksh doesn't grok 'local'
and AFAICT it's not actually doing anything useful in the code, so let's
see how things go without it.
2020-10-03 09:25:32 +10:00
Oleg d9e727dcc0 Fix `EOF: command not found` error in ssh-copy-id 2020-10-03 09:20:55 +10:00
Damien Miller 279261e1ea update version numbers 2020-09-27 17:25:01 +10:00
Damien Miller 9bb8a303ce sync with upstream ssh-copy-id rev f0da1a1b7 2020-09-22 10:07:43 +10:00
Damien Miller f93b187ab9 control over the colours in gnome-ssh-askpass[23]
Optionally set the textarea colours via $GNOME_SSH_ASKPASS_FG_COLOR and
$GNOME_SSH_ASKPASS_BG_COLOR. These accept the usual three or six digit
hex colours.
2020-09-18 14:55:48 +10:00
Damien Miller 9d3d36bdb1 focus improvement for gnome-ssh-askpass[23]
When serving a SSH_ASKPASS_PROMPT=none information dialog, ensure
then <enter> doesn't immediately close the dialog. Instead, require an
explicit <tab> to reach the close button, or <esc>.
2020-09-18 14:50:38 +10:00
Damien Miller 3ec9a6d731 Add ssh-sk-helper and manpage to RPM spec file
Based on patch from Fabio Pedretti
2020-07-20 13:09:25 +10:00
Damien Miller 58ad004acd prepare for 8.3 release 2020-05-12 12:58:46 +10:00
Damien Miller def31bc542 spelling mistakes
from https://fossies.org/linux/misc/openssh-8.2p1.tar.gz/codespell.html
2020-03-13 14:23:07 +11:00
Nico Kadel-Garcia b2491c289d Switch %define to %global for redhat/openssh.spec 2020-02-22 11:48:05 +11:00
Damien Miller 72f0ce33f0 crank version numbers 2020-02-12 09:28:35 +11:00
Darren Tucker 69e44ba701 Fix typo: 'you' -> 'your'.
bz#3108 from jmckitrick@gmail.com.
2020-01-06 09:02:53 +11:00
Damien Miller b497e920b4 Teach the GTK2/3 ssh-askpass the new prompt hints
ssh/ssh-agent now sets a hint environment variable $SSH_ASKPASS_PROMPT
when running the askpass program. This is intended to allow the
askpass to vary its UI across the three cases it supports: asking for
a passphrase, confirming the use of a key and (recently) reminding
a user to touch their security key.

This adapts the gnome-ssh-askpass[23] to use these hints. Specifically,
for SSH_ASKPASS_PROMPT=confirm it will skip the text input box and show
only "yes"/"no" buttons. For SSH_ASKPASS_PROMPT=none (used to remind
users to tap their security key), it shows only a "close" button.

Help wanted: adapt the other askpass programs in active use, including
x11-ssh-askpass, lxqt-openssh-askpass, etc.
2019-11-18 15:22:40 +11:00
Damien Miller cdf1d0a9f5 prepare for 8.1 release 2019-10-09 11:31:03 +11:00