Problem logging for Linux Bash:scp:command not found

Source: Internet
Author: User

1,SCPError

[Email protected] soft]# scpjdk-7u55-linux-x64.tar.gz 192.168.121.246:/soft/

[email protected] ' s password:

Bash:scp:command not found

Lost connection

[Email protected] soft]#

2, Debugging- v

[Email protected] soft]# scp-vjdk-7u55-linux-x64.tar.gz 192.168.121.246:/soft/

Executing:program/usr/bin/ssh host192.168.121.246, User (unspecified), command scp-v-t/soft/

OPENSSH_5.3P1, OpenSSL 1.0.1e-fips Feb2013

Debug1:reading Configuration Data/etc/ssh/ssh_config

Debug1:applying Options for *

Debug1:connecting to 192.168.121.246[192.168.121.246] Port 22.

Debug1:connection established.

debug1:permanently_set_uid:0/0

Debug1:identity file/root/.ssh/identitytype-1

Debug1:identity File/root/.ssh/identity-cert type-1

Debug1:identity file/root/.ssh/id_rsatype-1

Debug1:identity File/root/.ssh/id_rsa-cert type-1

Debug1:identity file/root/.ssh/id_dsatype-1

Debug1:identity File/root/.ssh/id_dsa-cert type-1

Debug1:identity file/root/.ssh/id_ecdsatype-1

Debug1:identity File/root/.ssh/id_ecdsa-cert type-1

Debug1:remote Protocol version 2.0, remotesoftware version openssh_5.3

debug1:match:openssh_5.3 Pat Openssh*

debug1:enabling Compatibility Mode Forprotocol 2.0

Debug1:local version stringssh-2.0-openssh_5.3

Debug1:ssh2_msg_kexinit sent

Debug1:ssh2_msg_kexinit received

Debug1:kex:server->client Aes128-ctrhmac-md5 None

Debug1:kex:client->server Aes128-ctrhmac-md5 None

Debug1:ssh2_msg_kex_dh_gex_request (1024<1024<8192) sent

Debug1:expecting Ssh2_msg_kex_dh_gex_group

Debug1:ssh2_msg_kex_dh_gex_init sent

Debug1:expecting ssh2_msg_kex_dh_gex_reply

Debug1:host ' 192.168.121.246 ' is known andmatches the RSA Host key.

Debug1:found Key In/root/.ssh/known_hosts:1

Debug1:ssh_rsa_verify:signature correct

Debug1:ssh2_msg_newkeys sent

Debug1:expecting Ssh2_msg_newkeys

Debug1:ssh2_msg_newkeys received

Debug1:ssh2_msg_service_request sent

Debug1:ssh2_msg_service_accept received

Debug1:authentications that can Continue:publickey,gssapi-keyex,gssapi-with-mic,password

Debug1:next Authentication Method:gssapi-keyex

Debug1:no Valid Key Exchange context

Debug1:next Authentication Method:gssapi-with-mic

Debug1:unspecified GSS failure. Minor code may provide more information

Cannot determine realm for numeric hostaddress

Debug1:unspecified GSS failure. Minor code may provide more information

Cannot determine realm for numeric hostaddress

Debug1:unspecified GSS failure. Minor code may provide more information

Debug1:unspecified GSS failure. Minor code may provide more information

Cannot determine realm for numeric hostaddress

Debug1:next Authentication Method:publickey

Debug1:trying Private Key:/root/.ssh/identity

Debug1:trying Private Key:/root/.ssh/id_rsa

Debug1:trying Private KEY:/ROOT/.SSH/ID_DSA

Debug1:trying Private KEY:/ROOT/.SSH/ID_ECDSA

Debug1:next Authentication Method:password

[email protected] ' s password:

See information such as the following:

......

Debug1:host ' 192.168.121.246 ' is known andmatches the RSA Host key.

Debug1:found Key In/root/.ssh/known_hosts:1

Debug1:ssh_rsa_verify:signature correct

Debug1:ssh2_msg_newkeys sent

Debug1:expecting Ssh2_msg_newkeys

Debug1:ssh2_msg_newkeys received

Debug1:ssh2_msg_service_request sent

Debug1:ssh2_msg_service_accept received

Debug1:authentications that can Continue:publickey,gssapi-keyex,gssapi-with-mic,password

Debug1:next Authentication Method:gssapi-keyex

Debug1:no Valid Key Exchange context

Debug1:next Authentication Method:gssapi-with-mic

......

from debug1:no valid Key exchangecontext can see that the problem should be on the receiving side server SCP problem.

3, go to the receiving end121.246View aboveSCP

[[Email protected] ~]# type SCP

-bash:type:scp:not found

[Email protected] ~]#

It sure does not recognize the SCP, try Yum installation, as seen below, invalid:

[email protected] ~]# Yum install-y SCP

Loaded Plugins:fastestmirror

Loading mirror speeds from cached hostfile

*base:ftp.sjtu.edu.cn

*extras:mirrors.163.com

*updates:centos.ustc.edu.cn

Setting up Install Process

No Package SCP available.

Error:nothing to do

[Email protected] ~]#

Baidu to, Yum installation SCP Package, yes openssh-clients , so once again Yum installation

Run yum install openssh-clients*-y installation

Ok. It's already available in CHECK,SCP. For example, the following can be seen

[[Email protected] ~]# type SCP

SCP IS/USR/BIN/SCP

[Email protected] ~]#

4, now on the original serverSCPit will be successful.

[Email protected] soft]# scpjdk-7u55-linux-x64.tar.gz 192.168.121.246:/soft/

[email protected] ' s password:

Jdk-7u55-linux-x64.tar.gz 100% 132MB 131.8mb/s 00:01

[Email protected] soft]#

5, summarize

SCP is successful and requires two servers to have an SCP service installed.

Problem logging for Linux Bash:scp:command not found

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.