[Question] scp: FATAL: Executing ssh1 in compatibility mode failed? |
15/01/2008 13:36:55 (+0700) | #1 | 110357 |
|
quanta
Moderator
|
Joined: 28/07/2006 14:44:21
Messages: 7265
Location: $ locate `whoami`
Offline
|
|
Trên server:
+ Phiên bản ssh đang dùng:
$ ssh -V
ssh: OpenSSH_3.9p1 on i686-pc-linux-gnu
+ Chỉ cho phép dùng giao thức ssh 2:
$ sudo cat /etc/ssh/sshd_config | grep Protocol
Protocol 2
Trên client:
+ Phiên bản ssh:
$ ssh -V
OpenSSH_4.7p1, OpenSSL 0.9.8b 04 May 2006
+ Giao thức đang sử dụng:
$ sudo cat /etc/ssh/sshd_config | grep Protocol
Password:
Protocol 2
+ Tiếp theo, thử dùng scp để copy 1 file nào đó trên server thì gặp lỗi này:
scp: warning: Executing scp1 compatibility.
scp: FATAL: Executing ssh1 in compatibility mode failed (Check that scp1 is in your PATH).
Thông tin từ google:
If you are opening an OpenSSH client to an SSH2 server (e.g. with scp -o "Protocol=2") and you get scp: warning: Executing scp1 compatibility. followed by something like:
scp: FATAL: Executing ssh1 in compatibility mode failed (Check that scp1 is in your PATH).
lost connection
You will need to send email to the administrator at the remote host to request them to install OpenSSH, see FAQ.
http://www.snailbook.com/faq/scp-ossh-to-ssh2.auto.html
Nhờ mọi người test và thảo luận thêm về trường hợp này. |
|
Let's build on a great foundation! |
|
|
|
[Question] Re: scp: FATAL: Executing ssh1 in compatibility mode failed? |
15/01/2008 22:31:17 (+0700) | #2 | 110404 |
pnco
HVA Friend
|
Joined: 24/06/2005 16:33:48
Messages: 515
Offline
|
|
Hello quanta!
Anh thì chưa gặp trường hợp này. Em thử cho anh xem file ssh_config trên client và lệnh scp em dùng thử xem.
PS: Cái thông tin em google được là từ client đến SSH2 server (1 phiên bản ssh thương mại). Trong TH của em thì nó không đúng vì em dùng OpenSSH. |
|
|
|
|
[Question] Re: scp: FATAL: Executing ssh1 in compatibility mode failed? |
15/01/2008 23:46:38 (+0700) | #3 | 110416 |
|
quanta
Moderator
|
Joined: 28/07/2006 14:44:21
Messages: 7265
Location: $ locate `whoami`
Offline
|
|
pnco wrote:
Hello quanta!
Anh thì chưa gặp trường hợp này. Em thử cho anh xem file ssh_config trên client và lệnh scp em dùng thử xem.
Dạ đây anh:
# $OpenBSD: ssh_config,v 1.23 2007/06/08 04:40:40 pvalchev Exp $
# This is the ssh client system-wide configuration file. See
# ssh_config(5) for more information. This file provides defaults for
# users, and the values can be changed in per-user configuration files
# or on the command line.
# Configuration data is parsed as follows:
# 1. command line options
# 2. user-specific file
# 3. system-wide file
# Any configuration value is only changed the first time it is set.
# Thus, host-specific definitions should be at the beginning of the
# configuration file, and defaults at the end.
# Site-wide defaults for some commonly used options. For a comprehensive
# list of available options, their meanings and defaults, please see the
# ssh_config(5) man page.
# Host *
# ForwardAgent no
# ForwardX11 no
# RhostsRSAAuthentication no
# RSAAuthentication yes
# PasswordAuthentication yes
# HostbasedAuthentication no
# GSSAPIAuthentication no
# GSSAPIDelegateCredentials no
# BatchMode no
# CheckHostIP yes
# AddressFamily any
# ConnectTimeout 0
# StrictHostKeyChecking ask
# IdentityFile ~/.ssh/identity
# IdentityFile ~/.ssh/id_rsa
# IdentityFile ~/.ssh/id_dsa
# Port 22
# Protocol 2,1
# Cipher 3des
# Ciphers aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc
# MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160
# EscapeChar ~
# Tunnel no
# TunnelDevice any:any
# PermitLocalCommand no
Host *
GSSAPIAuthentication yes
# If this option is set to yes then remote X11 clients will have full access
# to the original X11 display. As virtually no X11 client supports the untrusted
# mode correctly we set this to yes.
ForwardX11Trusted yes
# Send locale-related environment variables
SendEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
SendEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
SendEnv LC_IDENTIFICATION LC_ALL
Lệnh scp em thực hiện bình thường thôi:
$ scp -P 2244 server:/etc/ssh/sshd_config client
scp: warning: Executing scp1 compatibility.
scp: FATAL: Executing ssh1 in compatibility mode failed (Check that scp1 is in your PATH).
pnco wrote:
PS: Cái thông tin em google được là từ client đến SSH2 server (1 phiên bản ssh thương mại). Trong TH của em thì nó không đúng vì em dùng OpenSSH.
Dạ. |
|
Let's build on a great foundation! |
|
|
|
[Question] Re: scp: FATAL: Executing ssh1 in compatibility mode failed? |
16/01/2008 01:18:22 (+0700) | #4 | 110440 |
pnco
HVA Friend
|
Joined: 24/06/2005 16:33:48
Messages: 515
Offline
|
|
Em thử:
Code:
$scp -2 -P 2244 server:/file client
PS: Cái em đưa anh là sshd_config mà |
|
|
|
|
[Question] Re: scp: FATAL: Executing ssh1 in compatibility mode failed? |
16/01/2008 01:22:56 (+0700) | #5 | 110443 |
|
quanta
Moderator
|
Joined: 28/07/2006 14:44:21
Messages: 7265
Location: $ locate `whoami`
Offline
|
|
pnco wrote:
Em thử:
Code:
$scp -2 -P 2244 server:/file client
Vẫn thế anh à.
pnco wrote:
PS: Cái em đưa anh là sshd_config mà
Oạch, ban sáng em chưa tỉnh ngủ. Đã sửa lại. |
|
Let's build on a great foundation! |
|
|
|
[Question] Re: scp: FATAL: Executing ssh1 in compatibility mode failed? |
25/01/2008 12:03:42 (+0700) | #6 | 112049 |
|
quanta
Moderator
|
Joined: 28/07/2006 14:44:21
Messages: 7265
Location: $ locate `whoami`
Offline
|
|
Gửi Anh_già_khó_tính
Trong /etc/ssh/ssh_config (cũng như ~/.ssh/config) em đã thử thêm vài dòng thế này:
Code:
Host *
Hostname <IP_Address>
Port <Port_Number>
User quanta
# Em thử thêm cả dòng này
Protocol 2
Mọi chuyện vẫn thế anh ạ:
Code:
$ scp <IP_Address>:/etc/ssh/sshd_config /home/quanta/
quanta@<IP_Address>'s password:
scp: warning: Executing scp1 compatibility.
scp: FATAL: Executing ssh1 in compatibility mode failed (Check that scp1 is in your PATH).
Trong khi đó sftp đây ạ (Vẫn get ầm ầm)
Code:
$ sftp quanta@<IP_Address>:/etc/ssh
Connecting to <IP_Address>...
quanta@<IP_Address>'s password:
Changing to: /etc/ssh
sftp> get sshd_config
Fetching /etc/ssh/sshd_config to sshd_config
/etc/ssh/sshd_config 100% 3082 1.5KB/s 00:02
|
|
Let's build on a great foundation! |
|
|
|
[Question] Re: scp: FATAL: Executing ssh1 in compatibility mode failed? |
25/01/2008 17:35:12 (+0700) | #7 | 112073 |
|
conmale
Administrator
|
Joined: 07/05/2004 23:43:15
Messages: 9353
Location: down under
Offline
|
|
Chạy thử: ls -la `which scp` rồi post kết quả lên đây xem? |
|
What bringing us together is stronger than what pulling us apart. |
|
|
|
[Question] Re: scp: FATAL: Executing ssh1 in compatibility mode failed? |
25/01/2008 19:19:22 (+0700) | #8 | 112080 |
StarGhost
Elite Member
|
0 |
|
|
Joined: 29/03/2005 20:34:22
Messages: 662
Location: The Queen
Offline
|
|
Thử copy file scp từ client sang đè lên file scp trên server xem (nhớ backup). Nếu không được thì thử ngược lại. Ít nhất thì 2 files giống hệt nhau chắc communicate không có vấn đề gì. Tốt nhất nên thử khi không có option nào để chắc chắn là scp hoạt động bình thường.
Bồ có thể cho biết server và client dùng distro nào không?
p/s: sorry anh conmale, quote nhầm. |
|
Mind your thought. |
|
|
|
[Question] Re: scp: FATAL: Executing ssh1 in compatibility mode failed? |
25/01/2008 22:15:23 (+0700) | #9 | 112091 |
|
quanta
Moderator
|
Joined: 28/07/2006 14:44:21
Messages: 7265
Location: $ locate `whoami`
Offline
|
|
conmale wrote:
Chạy thử: ls -la `which scp` rồi post kết quả lên đây xem?
Dạ, đây anh:
-rwxr-xr-x 1 root root 53704 2007-11-21 02:40 /usr/bin/scp
StarGhost wrote:
...
Bồ có thể cho biết server và client dùng distro nào không?
Server: Red Hat
Linux hostname 2.6.9-5.ELsmp #1 SMP Wed Jan 5 19:30:39 EST 2005 i686 i686 i386 GNU/Linux
Client: Fedora
Linux hostname 2.6.23.9-85.fc8 #1 SMP Fri Dec 7 15:49:59 EST 2007 i686 i686 i386 GNU/Linux
|
|
Let's build on a great foundation! |
|
|
|
[Question] Re: scp: FATAL: Executing ssh1 in compatibility mode failed? |
25/01/2008 22:21:24 (+0700) | #10 | 112092 |
|
conmale
Administrator
|
Joined: 07/05/2004 23:43:15
Messages: 9353
Location: down under
Offline
|
|
Thử:
$ scp -2 -vv <IP_Address>:/etc/ssh/sshd_config /home/quanta/
xem sao?
Post hết kết quả "verbose" lên đây. |
|
What bringing us together is stronger than what pulling us apart. |
|
|
|
[Question] Re: scp: FATAL: Executing ssh1 in compatibility mode failed? |
26/01/2008 00:12:35 (+0700) | #11 | 112114 |
|
quanta
Moderator
|
Joined: 28/07/2006 14:44:21
Messages: 7265
Location: $ locate `whoami`
Offline
|
|
conmale wrote:
Thử:
$ scp -2 -vv <IP_Address>:/etc/ssh/sshd_config /home/quanta/
xem sao?
Post hết kết quả "verbose" lên đây.
Hì, em quên mất cái tuỳ chọn này.
"Làm ăn" kiểu như "Thiên Lôi chỉ đâu đánh đấy" thế này thì chết, em xin rút kinh nghiệm.
$ scp -2 -vv <IP_Address>:/etc/ssh/sshd_config /home/quanta
Executing: program /usr/bin/ssh host <IP_Address>, user (unspecified), command scp -v -f /etc/ssh/sshd_config
OpenSSH_4.7p1, OpenSSL 0.9.8b 04 May 2006
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to <IP_Address> port <Port_Number>.
debug2: fd 3 setting O_NONBLOCK
debug1: fd 3 clearing O_NONBLOCK
debug1: Connection established.
debug1: identity file /home/quanta/.ssh/id_rsa type -1
debug2: key_type_from_name: unknown key type '-----BEGIN'
debug2: key_type_from_name: unknown key type '-----END'
debug1: identity file /home/quanta/.ssh/id_dsa type 2
debug1: Remote protocol version 2.0, remote software version OpenSSH_3.9p1
debug1: match: OpenSSH_3.9p1 pat OpenSSH_3.*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.7
debug2: fd 3 setting O_NONBLOCK
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-rsa,ssh-dss
debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib
debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserved 0
debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-rsa,ssh-dss
debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,zlib
debug2: kex_parse_kexinit: none,zlib
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserved 0
debug2: mac_setup: found hmac-md5
debug1: kex: server->client aes128-cbc hmac-md5 none
debug2: mac_setup: found hmac-md5
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug2: dh_gen_key: priv key bits set: 129/256
debug2: bits set: 483/1024
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host '<IP_Address>:<Port_Number>' is known and matches the RSA host key.
debug1: Found key in /home/quanta/.ssh/known_hosts:3
debug2: bits set: 517/1024
debug1: ssh_rsa_verify: signature correct
debug2: kex_derive_keys
debug2: set_newkeys: mode 1
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug2: set_newkeys: mode 0
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug2: key: /home/quanta/.ssh/id_rsa ((nil))
debug2: key: /home/quanta/.ssh/id_dsa (0xb82de780)
debug1: Authentications that can continue: publickey,gssapi-with-mic,password
debug1: Next authentication method: gssapi-with-mic
debug1: Unspecified GSS failure. Minor code may provide more information
No credentials cache found
debug1: Unspecified GSS failure. Minor code may provide more information
No credentials cache found
debug1: Unspecified GSS failure. Minor code may provide more information
debug2: we did not send a packet, disable method
debug1: Next authentication method: publickey
debug1: Trying private key: /home/quanta/.ssh/id_rsa
debug1: Offering public key: /home/quanta/.ssh/id_dsa
debug2: we sent a publickey packet, wait for reply
debug1: Authentications that can continue: publickey,gssapi-with-mic,password
debug2: we did not send a packet, disable method
debug1: Next authentication method: password
quanta@<IP_Address>:'s password:
debug2: we sent a password packet, wait for reply
debug1: Authentication succeeded (password).
debug2: fd 4 setting O_NONBLOCK
debug2: fd 6 setting O_NONBLOCK
debug1: channel 0: new [client-session]
debug2: channel 0: send open
debug1: Entering interactive session.
debug2: callback start
debug2: client_session2_setup: id 0
debug1: Sending environment.
debug1: Sending env LANG = en_US.UTF-8
debug2: channel 0: request env confirm 0
debug1: Sending command: scp -v -f /etc/ssh/sshd_config
debug2: channel 0: request exec confirm 0
debug2: fd 3 setting TCP_NODELAY
debug2: callback done
debug2: channel 0: open confirm rwindow 0 rmax 32768
debug2: channel 0: rcvd adjust 131072
debug2: channel 0: rcvd ext data 44
debug2: channel 0: rcvd ext data 91
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug2: channel 0: rcvd eof
debug2: channel 0: output open -> drain
debug2: channel 0: rcvd close
debug2: channel 0: close_read
debug2: channel 0: input open -> closed
debug2: channel 0: obuf_empty delayed efd 7/(135)
scp: warning: Executing scp1 compatibility.
scp: FATAL: Executing ssh1 in compatibility mode failed (Check that scp1 is in your PATH).
debug2: channel 0: written 135 to efd 7
debug2: channel 0: obuf empty
debug2: channel 0: close_write
debug2: channel 0: output drain -> closed
debug2: channel 0: almost dead
debug2: channel 0: gc: notify user
debug2: channel 0: gc: user detached
debug2: channel 0: send close
debug2: channel 0: is dead
debug2: channel 0: garbage collecting
debug1: channel 0: free: client-session, nchannels 1
debug1: fd 0 clearing O_NONBLOCK
debug1: fd 1 clearing O_NONBLOCK
debug1: Transferred: stdin 0, stdout 0, stderr 0 bytes in 1.5 seconds
debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 0.0
debug1: Exit status 255
Em đang "ngâm cứu" những dòng da cam và đỏ ở trên. Đáng chú ý nhất có lẽ là dòng "Unspecified GSS failure. Minor code may provide more information
No credentials cache found", vì sau đó là "we did not send a packet, disable method".
Cảm ơn anh. |
|
Let's build on a great foundation! |
|
|
|
|