[SOLVED] Errors configuring SCP on internal network.
Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am trying to configure SSH and SCP to copy some files from one Fedora machine to another. I have successfully got ssh working, but haven't got scp working. Check this out..
Code:
scp -v raj@192.168.1.1:/var/lib/AccountsService/icons/* ./temp/
Executing: program /usr/bin/ssh host 192.168.1.1, user raj, command scp -v -f -- /var/lib/AccountsService/icons/*
OpenSSH_5.9p1, OpenSSL 1.0.0j-fips 10 May 2012
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 50: Applying options for *
debug1: Connecting to 192.168.1.1 [192.168.1.1] port 22.
debug1: Connection established.
debug1: identity file /home/raj/.ssh/id_rsa type -1
debug1: identity file /home/raj/.ssh/id_rsa-cert type -1
debug1: identity file /home/raj/.ssh/id_dsa type -1
debug1: identity file /home/raj/.ssh/id_dsa-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.9
debug1: match: OpenSSH_5.9 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.9
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-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: Server host key: RSA 79:b7:eb:d8:fb:6a:43:8f:f7:72:a5:de:81:9d:14:45
debug1: Host '192.168.1.1' is known and matches the RSA host key.
debug1: Found key in /home/raj/.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: Roaming not allowed by server
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 host address
debug1: Unspecified GSS failure. Minor code may provide more information
Cannot determine realm for numeric host address
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 host address
debug1: Next authentication method: publickey
debug1: Trying private key: /home/raj/.ssh/id_rsa
debug1: Trying private key: /home/raj/.ssh/id_dsa
debug1: Next authentication method: password
raj@192.168.1.1's password:
debug1: Authentication succeeded (password).
Authenticated to 192.168.1.1 ([192.168.1.1]:22).
debug1: channel 0: new [client-session]
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug1: Sending environment.
debug1: Sending env XMODIFIERS = @im=none
debug1: Sending env LANG = en_US.utf8
debug1: Sending command: scp -v -f -- /var/lib/AccountsService/icons/*
Sink: I'm thinking about DIGITAL READ-OUT systems and computer-generated
I'm thinking about DIGITAL READ-OUT systems and computer-generated
raj@rajhome2 Videos$ debug1: client_input_channel_req: channel 0 rtype exit-signal reply 0
debug1: channel 0: free: client-session, nchannels 1
debug1: fd 0 clearing O_NONBLOCK
debug1: fd 1 clearing O_NONBLOCK
Transferred: sent 2080, received 2256 bytes, in 0.2 seconds
Bytes per second: sent 10002.0, received 10848.3
debug1: Exit status -1
debug1: Sending command: scp -v -f -- /var/lib/AccountsService/icons/*
Sink: I'm thinking about DIGITAL READ-OUT systems and computer-generated
I'm thinking about DIGITAL READ-OUT systems and computer-generated
This appears to be the output of a fortune command. In general, if the remote machine prints out any output at login, usually due to commands in ~/.bashrc, scp fails. Try to remove any output from the login process on the remote machine and it should solve the problem. Not a security issue, anyway.
[code]
raj@rajhome2 users$ ssh raj@192.168.1.1
raj@192.168.1.1's password:
Last login: Fri Oct 12 09:33:53 2012 from 192.168.1.104 bash: fortune: command not found...
[/code}
What is the scp/ssh logic for login? I know it runs the ~.bashrc and the /etc/.bashrc if it exists, but there must be something else it executes before that.
The shell should be invoked as a non-interactive login shell, so I would look in the /etc/profile, ~/.bash_profile ~/.profile and so on. Anyway you can easily find out where the offending command is, by means of
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.