On Tue, 20 Aug 2002, risiyanto wrote:
# Saya punya server rh72 yang pake openssh, saya set protokol 1.
# supaya server rh62 yang perlu sync data, gak perlu input password lagi.
# (pake ssh-copy-id)
# Ada yang nyaranin, di set protocol 2 aja, biar secure.
# dan server yang lama gak bisa login tanpa password lagi =(
# sudah saya install versi yang sama :
# openssh-2.9.9p2-1ss, dl dari untroubled.org
untrouble.org ?? emang ini official mirrornya OpenSSH ?
kalo bisa download langsung dari Official site.
# tetep saja nggak bisa ssh-copy-id nya.
Untuk pemakaian protocol bisa di support kedua2x nya
/etc/ssh/ssd_config :
Protocol 2,1 <--- untuk protocol 2 dan 1
tapi sebaiknya tetep pake protocol versi 2 karena memang lebih secure,
rsa1 (identity.pub) tidak digunakan lagi di versi 2 jadi dari client harus
memakai rsa atau dsa
ssh-keygen(1):
-t type
Specifies the type of the key to create. The possible values are
``rsa1'' for proto-
col version 1 and ``rsa'' or ``dsa'' for protocol version 2.
saya attach sedikit patch untuk client yang lama agar bisa ssh-copy-id ke
server yg pake protocol versi 2.
patch -p0 `which ssh-copy-id` < ssh-copy-id-1to2.patch
BTW, saya sendiri baru tahu ttg tool ssh-copy-id ini, dan ternyata memang
cuman script untuk copy public key kita ke remote host,
selama ini kalo pengen ssh tanpa password ya pake cara manual cat >>
~/.ssh/authorized_keys{,2} di remote host.
PS:
1. patch itu akan merubah ssh-copy-id untuk secara default memakai RSA
key saja, dan juga tidak bisa lagi untuk ssh-copy-id ke server yang pake
protocol versi 1 (sebaiknya jangan pake versi 1)
2. kalo pengen balikin lagi ke original ssh-copy-id tambahkan option -R
pada command patch
3. kritikan pada patch langsung > /dev/null :) , maklum itu patch yang
sekedarnya dan hanya di test 3 kali dengan sekali berhasil.
Cheers, Indra Kusuma
--
,''`. How (Debian GNU/)Linux Are You ? http://{Indra,Debian}.Kusuma.OR.ID
: :' : How IPv6 Are You ? ....................... http://IPv6.Debian.OR.ID
`. `' 1024D/4D829E49 .. 187D 8C98 FB76 E1A8 5558 853A 4795 4FC1 4D82 9E49
`-
--- ssh-copy-id.orig 2002-08-20 18:55:08.000000000 +0700
+++ ssh-copy-id 2002-08-20 18:55:39.000000000 +0700
@@ -5,7 +5,12 @@
# Obviously, the remote machine must accept password authentication,
# or one of the other keys in your ssh-agent, for this to work.
-ID_FILE="${HOME}/.ssh/identity.pub"
+# Modifying the authorized_key and client public key to let old client
+# connect to ssh protocol version 2
+
+ID_FILE="${HOME}/.ssh/id_rsa.pub"
+
+test ! -f ${ID_FILE} && echo "You dont have key to connect using ssh protocol version
+2, please generate with ssh-keygen -t rsa" && exit 1
if [ "-i" = "$1" ]; then
shift
@@ -33,12 +38,12 @@
exit 1
fi
-{ eval "$GET_ID" ; } | ssh $1 "umask 077; test -d .ssh || mkdir .ssh ; cat >>
.ssh/authorized_keys"
+{ eval "$GET_ID" ; } | ssh $1 "umask 077; test -d .ssh || mkdir .ssh ; cat >>
+.ssh/authorized_keys2"
cat <<EOF
Now try logging into the machine, with "ssh '$1'", and check in:
- .ssh/authorized_keys
+ .ssh/authorized_keys2
to make sure we haven't added extra keys that you weren't expecting.