Bugzilla – Attachment 1928 Details for
Bug 1823
specify port in ssh-copy-id
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch against the current version of fedora
ssh_copy_id_port.patch (text/plain), 1.02 KB, created by
Paolo Borelli
on 2010-09-17 07:28:53 AEST
(
hide
)
Description:
patch against the current version of fedora
Filename:
MIME Type:
Creator:
Paolo Borelli
Created:
2010-09-17 07:28:53 AEST
Size:
1.02 KB
patch
obsolete
>--- /usr/bin/ssh-copy-id 2010-09-15 20:11:04.000000000 +0200 >+++ ssh-copy-id 2010-09-16 23:12:00.385625000 +0200 >@@ -7,6 +7,12 @@ > > ID_FILE="${HOME}/.ssh/id_rsa.pub" > >+if [ "-p" = "$1" ]; then >+ shift >+ PORT_OPT="-p $1" >+ shift >+fi >+ > if [ "-i" = "$1" ]; then > shift > # check if we have 2 parameters left, if so the first is the new ID file >@@ -34,11 +40,11 @@ > fi > > if [ "$#" -lt 1 ] || [ "$1" = "-h" ] || [ "$1" = "--help" ]; then >- echo "Usage: $0 [-i [identity_file]] [user@]machine" >&2 >+ echo "Usage: $0 [-p port] [-i [identity_file]] [user@]machine" >&2 > exit 1 > fi > >-{ eval "$GET_ID" ; } | ssh $1 "umask 077; test -d .ssh || mkdir .ssh ; cat >> .ssh/authorized_keys; test -x /sbin/restorecon && /sbin/restorecon .ssh .ssh/authorized_keys" || exit 1 >+{ eval "$GET_ID" ; } | ssh $PORT_OPT $1 "umask 077; test -d .ssh || mkdir .ssh ; cat >> .ssh/authorized_keys; test -x /sbin/restorecon && /sbin/restorecon .ssh .ssh/authorized_keys" || exit 1 > > cat <<EOF > Now try logging into the machine, with "ssh '$1'", and check in:
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1823
: 1928