LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 02-09-2011, 10:45 AM   #1
oceani
LQ Newbie
 
Registered: Feb 2011
Posts: 2

Rep: Reputation: 0
SCP error


I recently changed internal IP addresses on both an HP-UX computer (now 192.168.0.101) and a RedHat Linux machine (192.168.0.3). Prior to this I could SSH & SCP back and forth between both machines with no problems. Now I can SSH and SCP from the Linux machine to the HPUX machine, but when I try to SCP a file from the HPUX machine to the Linux machine, the only thing I see on after hitting Return is "Linux 32bit", but the file will not transfer. Any ideas how I can fix this?
 
Old 02-09-2011, 12:51 PM   #2
xeleema
Member
 
Registered: Aug 2005
Location: D.i.t.h.o, Texas
Distribution: Slackware 13.x, rhel3/5, Solaris 8-10(sparc), HP-UX 11.x (pa-risc)
Posts: 987
Blog Entries: 4

Rep: Reputation: 248Reputation: 248Reputation: 248
Greetingz!

First, check your logs (linux:/var/log/messages, HP-UX: whereever you point syslog to dump to). Second, make sure you can SSH Linux -> HP-UX and HP-UX -> Linux.

If nothing obvious pops up, check the sshd_config file and make sure the IP address in there (if specified) matches what the host has set now.

Still broke? Check/dump the .ssh/known_hosts file on each system, then re-ssh back into each of them from each other.

EDIT: If this (or any other) post helps you out, hit "Yes" to the question on the bottom right-hand corner of each post.
If your problem's been solved, use "Thread Tools" at the top of the page to mark this as [SOLVED].

Last edited by xeleema; 02-09-2011 at 12:52 PM.
 
Old 02-09-2011, 02:30 PM   #3
oceani
LQ Newbie
 
Registered: Feb 2011
Posts: 2

Original Poster
Rep: Reputation: 0
SCP - Still working on problem

xeleema,

Still not working. Ican indeed SSH to each machine from the other and I can SCP a file from the Linux machine to the HPUX. Nothing caught my attention in either of the log files (which may not mean much given my level of understanding). No IP addresses are listed in the sshd_config files and I tried removing the known_hosts files and starting over, but that did not work either. This is very strange considering SCP has been working on both machines for sveral years prior to this change. Thanks again for your help.
 
Old 02-09-2011, 02:49 PM   #4
Reuti
Senior Member
 
Registered: Dec 2004
Location: Marburg, Germany
Distribution: openSUSE 11.4
Posts: 1,319

Rep: Reputation: 252Reputation: 252Reputation: 252
Is there any default in HP-UX defined in /etc/ssh/ssh_config or your personal $HOME/.ssh/config (I don't know the exact location of it on HP-UX though)? Maybe it was defined for the old TCP/IP address and is not working any longer as you changed the target address. Or the deamon on Linux is not accepting the session.

What is the output when you start scp with -vvv (triple times) in verbose mode?
 
Old 02-09-2011, 02:54 PM   #5
xeleema
Member
 
Registered: Aug 2005
Location: D.i.t.h.o, Texas
Distribution: Slackware 13.x, rhel3/5, Solaris 8-10(sparc), HP-UX 11.x (pa-risc)
Posts: 987
Blog Entries: 4

Rep: Reputation: 248Reputation: 248Reputation: 248
Okay....well for grins,

1) stop and start (not "restart", actually kill all instances) SSHd on both systems.
NOTE: You might want to make sure you have console access first.

2) Now remove the ~/.ssh directory for your account on both systems (maybe tar it up if you have config information in there)

3) Check the sshd_config and ssh_config for each system.
Get to the "guts" by doing this for each file on each system;
Code:
grep -v "^#" /path/to/sshd_config | grep . | sort
Still nothing out-of-the-ordinary?

Then you're going to have to find out what information is hitting your logs. Suggestion would be to restart the SSHd service with the "verbose" flag, or when you ssh, use "ssh -v username@hostname"

HOWTO: Be Verbose During SSH

On the Linux Box
Open two terminal windows;
Window #1 "tail -f /var/log/messages"
Window #2 This will be your "SSH" terminal.

On the HP-UX Box
Open two terminal windows;
Window #1 "tail -f /where/your/syslog/logs/stuff"
Window #1 This will be your "SSH" terminal.

Okay, SSH from Linux to HP-UX.

Here's what you should NOT see;

Code:
luser@linux$ ssh -v luser@hpux
OpenSSH_4.3p2, OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to hpux [###.###.###.###] port 22.
debug1: Connection established.
debug1: identity file /home/luser/.ssh/identity type -1
debug1: identity file /home/luser/.ssh/id_rsa type -1
debug1: identity file /home/luser/.ssh/id_dsa type -1
debug1: loaded 3 keys
debug1: Remote protocol version 2.0, remote software version OpenSSH_4.3
debug1: match: OpenSSH_4.3 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.3
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
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
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@       WARNING: POSSIBLE DNS SPOOFING DETECTED!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
The RSA host key for hpux has changed,
and the key for the according IP address ###.###.###.###
is unknown. This could either mean that
DNS SPOOFING is happening or the IP address for the host
and its host key have changed at the same time.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
##:##:##:##:##:##:##:##:##:##:##:##:##:##:##:##.
Please contact your system administrator.
Add correct host key in /home/luser/.ssh/known_hosts to get rid of this message.
Offending key in /home/luser/.ssh/known_hosts:3
RSA host key for hydra has changed and you have requested strict checking.
Host key verification failed.
luser@linux$
This is what you SHOULD see;
Code:
luser@linux$ ssh -v sysop@hpux
OpenSSH_4.3p2, OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to hpux [###.###.###.###] port 22.
debug1: Connection established.
debug1: identity file /home/luser/.ssh/identity type -1
debug1: identity file /home/luser/.ssh/id_rsa type -1
debug1: identity file /home/luser/.ssh/id_dsa type -1
debug1: loaded 3 keys
debug1: Remote protocol version 2.0, remote software version OpenSSH_4.3
debug1: match: OpenSSH_4.3 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.3
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
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
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
The authenticity of host 'hpux (###.###.###.###)' can't be established.
RSA key fingerprint is ##:##:##:##:##:##:##:##:##:##:##:##:##:##:##:##.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'hydra,192.168.1.120' (RSA) to the list of known hosts.
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-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
No credentials cache found

debug1: Next authentication method: publickey
debug1: Trying private key: /home/luser/.ssh/identity
debug1: Trying private key: /home/luser/.ssh/id_rsa
debug1: Trying private key: /home/luser/.ssh/id_dsa
debug1: Next authentication method: password
luser@hpux's password: 
debug1: Authentication succeeded (password).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: Sending environment.
debug1: Sending env LANG = en_US.UTF-8
Last login: Tue Feb  8 16:47:05 2011
luser@hpux$
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
scp does not work and gives the following error message: scp: FATAL: Executing ssh1 i akay Linux - Networking 16 09-28-2008 11:41 PM
scp error ......... sniffer_raghav Linux - Networking 6 11-29-2007 07:35 AM
Get an error when I use 'scp' Abomb Linux - Security 3 08-24-2006 07:47 AM
scp error. bruse Linux - Newbie 9 09-02-2005 03:44 PM
Scp Error chaitu_iiit Linux - Software 1 12-08-2004 09:08 AM


All times are GMT -5. The time now is 02:34 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration