scp not working while ssh works


 
Thread Tools Search this Thread
Operating Systems AIX scp not working while ssh works
# 1  
Old 05-11-2010
scp not working while ssh works

I try to transfer a file from a Linux host to an AIX-host via scp, which fails. Logging into the AIX-system from the same Linux-system via ssh works well and i am a bit at a loss where to look.

The original setup was with a user account provided via LDAP, but because of the error message (see transcript below, "unknown user" near the end) i created a local user, which didn't change anything, though. In the following "172.20.9.101" is the address of the AIX-system (there is no DNS).

Code:
[bakunin@linux-system ~]$ scp -v config.tar bakunin@172.20.9.101:~/config.tar
Executing: program /usr/bin/ssh host 172.20.9.101, user bakunin, command scp -v -t ~/config.tar
OpenSSH_5.1p1, OpenSSL 0.9.8g 19 Oct 2007
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to 172.20.9.101 [172.20.9.101] port 22.
debug1: Connection established.
debug1: identity file /home/bakunin/.ssh/identity type -1
debug1: identity file /home/bakunin/.ssh/id_rsa type 1
debug1: identity file /home/bakunin/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.2
debug1: match: OpenSSH_5.2 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.1
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
debug1: Host '172.20.9.101' is known and matches the RSA host key.
debug1: Found key in /home/bakunin/.ssh/known_hosts:20
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,password,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Trying private key: /home/bakunin/.ssh/identity
debug1: Offering public key: /home/bakunin/.ssh/id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 277
debug1: read PEM private key done: type RSA
debug1: Authentication succeeded (publickey).
debug1: channel 0: new [client-session]
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug1: Sending environment.
debug1: Sending env LANG = C
debug1: Sending command: scp -v -t ~/config.tar
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: client_input_channel_req: channel 0 rtype eow@openssh.com reply 0
unknown user 207
debug1: channel 0: free: client-session, nchannels 1
debug1: fd 0 clearing O_NONBLOCK
debug1: fd 1 clearing O_NONBLOCK
Transferred: sent 2256, received 2328 bytes, in 0.0 seconds
Bytes per second: sent 83580.5, received 86247.9
debug1: Exit status 255
lost connection

Further information about the systems (please ask if you need additional info):

AIX-Version: 6.1-ML4

Code:
bakunin@aix $lslpp -l | grep -i ss[hl]
  gsksa.rte                 7.0.4.11  COMMITTED  AIX Certificate and SSL Base
  gskta.rte                 7.0.4.11  COMMITTED  AIX Certificate and SSL Base
  openssh.base.client     5.2.0.5300  COMMITTED  Open Secure Shell Commands
  openssh.base.server     5.2.0.5300  COMMITTED  Open Secure Shell Server
  openssh.license         5.2.0.5300  COMMITTED  Open Secure Shell License
  openssh.man.en_US       5.2.0.5300  COMMITTED  Open Secure Shell
  openssh.msg.EN_US       5.2.0.5300  COMMITTED  Open Secure Shell Messages -
  openssh.msg.en_US       5.2.0.5300  COMMITTED  Open Secure Shell Messages -
  openssl.base            0.9.8.1102  COMMITTED  Open Secure Socket Layer
  openssl.license         0.9.8.1102  COMMITTED  Open Secure Socket License
  openssl.man.en_US       0.9.8.1102  COMMITTED  Open Secure Socket Layer
  openssh.base.client     5.2.0.5300  COMMITTED  Open Secure Shell Commands
  openssh.base.server     5.2.0.5300  COMMITTED  Open Secure Shell Server
  openssl.base            0.9.8.1102  COMMITTED  Open Secure Socket Layer

Linux-System:

Code:
[bakunin@linux]$ uname -a
Linux linux 2.6.27.25-78.2.56.fc9.i686 #1 SMP Thu Jun 18 12:47:50 EDT 2009 i686 i686 i386 GNU/Linux
[bakunin@linux]$ cat /etc/redhat-release 
Fedora release 9 (Sulphur)

Thanks for your help.

bakunin

Last edited by bakunin; 05-11-2010 at 12:30 PM..
# 2  
Old 05-11-2010
On the AIX side, is there anything in the sshd_config about chroot-ing the users if they use sftp or scp?
# 3  
Old 05-11-2010
I have found that scp sometimes fails if you have any shell initialization in your .profile, etc. which produces output for non-interactive sessions. If "ssh AIXHOST /bin/true" produces any output, then try modifying your shell initialization.
# 4  
Old 05-11-2010
Quote:
Originally Posted by pludi
On the AIX side, is there anything in the sshd_config about chroot-ing the users if they use sftp or scp?
no, there isn't. Here is the complete config (comments stripped):

Code:
Protocol 2
SyslogFacility AUTH
LogLevel INFO
PermitRootLogin no
PermitEmptyPasswords no
UsePAM yes
AllowTcpForwarding yes
X11Forwarding yes
PrintMotd yes
UseDNS no
Subsystem       sftp    /usr/sbin/sftp-server

Quote:
Originally Posted by fpmurphy
If "ssh AIXHOST /bin/true"
I have tried it and it produced nothing.

In the meanwhile i have found out a bit more, alas nothing of any remedial value:

I tried to create another user completely unknown to LDAP to make certain the authentication between LDAP and system don't get confused: no change of the symptoms described above.

I tried to initiate the scp from the other direction and learned that there is a firewall between these two hosts, which seemingly forbids scp-communication in the other direction. There is simply no response at all when trying like this, not even an error message. The command will just time out eventually:

Code:
bakunin@aix $ scp bakunin@linux:~/file .

We tried to scp from a third system (also AIX, but IMHO this makes any difference) with a different user-ID, which works. It is at least established therefore, that the scp-system on the AIX-host in question is not broken in itself.

bakunin
# 5  
Old 05-13-2010
as soons as there is a firewall in the loop then the finger pints often at that. Try getting a Network Tech to look at the firewall when you try to establish the connection.

Causes I've seen with firewalls include:
1. File size limits on a copy.
2. The routing causes the Firewall to only see part of the TCP/IP traffic (LPAR with multiple interfaces)
3. Firewall blocks protocol.

Best debugging is as you've done, copy between two servers on the local subnet (or even via 127.0.0.1 loopback address) and likewise on the source system.

After that call the Network Tech o check the firewall.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Cant ssh, but ping works

I cant ping to some of my machines, but ping works. I attach screenshots. Port is open and it is 22. I can't figure out why i cant access. https://www.unix.com/attachments/unix-for-advanced-and-expert-users/7492d1541541072-cant-ssh-but-ping-works-sshlisten-jpg... (17 Replies)
Discussion started by: tomislav91
17 Replies

2. Shell Programming and Scripting

SSh works but sftp doesn't for all users except root

I am sorry if i post in wrong Form. i have AIX server in which ssh works for all users but sftp only works for root user . it is too much important for me to solve this . Your help will be greatly appreciated. (1 Reply)
Discussion started by: khalid khanAIB
1 Replies

3. AIX

Cron job not working but works on other nodes.

Hi All, I have a many cron jobs scheduled in my AIX server. Only one cron not getting executed in the same server but that job is good on all other servers. Here is my cron , which will keep last 30 files and remove others., 00 00 * * * /usr/bin/find /tmp/reports/nmon -name *.nmon -mtime... (9 Replies)
Discussion started by: Thala
9 Replies

4. UNIX for Dummies Questions & Answers

Passwordless SSH works, scp does not

I know the "how to setup passwordless SSH" question is asked probably 5 times a week. I know how to setup passwordless SSH, it's not tough, however after reinstalling linux on my server, I found a problem. I could SSH into my server just fine, no password required, however SCP still required a... (4 Replies)
Discussion started by: corrado33
4 Replies

5. Solaris

SCP not working while SSH works

Dear expert, I have gone through the thread A similar error arising for me , please find the debug logs. I have tried from another server to push a file using scp but not working for me. i am using SunOS SUNW,SPARC-Enterprise machine. Thanks (5 Replies)
Discussion started by: posix
5 Replies

6. UNIX for Advanced & Expert Users

SSH key works from CMD line not script

OK , .. This is an odd one. I have a new server and I need to have a tunnel open to it. I have this exact process running on a few others but this new one I just got is not allowing the script to connect. I set up my users account and ssh keys from the server that will host the tunneling i... (6 Replies)
Discussion started by: jeffsandman0035
6 Replies

7. Solaris

ssh and scp not working

Dear All, whenever i try the command ssh , it is giving the below error. ld.so.1: ssh: fatal: relocation error: file /usr/bin/ssh: symbol SUNWcry_installed: referenced symbol not found Killed For SCP also the same error is coming. Pl reply me if you have answers. Rj (4 Replies)
Discussion started by: jegaraman
4 Replies

8. UNIX for Advanced & Expert Users

script to monitor if ssh works.

Hi All, I have a setup of around 100 servers with atleast 10 users on each box.The public key from one server has been created and updated on all other servers , so that passwordless login can be done from any use. We recently had a problem that ssh keys on one of the system was changed and... (2 Replies)
Discussion started by: nua7
2 Replies

9. AIX

SSH login hangs, serial console works

Server, running AIX 6.1 developed strange problem when logging in via SSH -- ssh client hangs without any error. It is possible to run commands on server, using ssh ("ssh servername ls -l" is OK) It is possible to log in normally, using serial console connected to server. It was possible to... (2 Replies)
Discussion started by: ivar.zarans
2 Replies

10. Shell Programming and Scripting

SSH and SCP

The following ksh script is trying to get a file's cksum then, scp it over to a remote machine - get the cksum there and then compare the two cksums to make sure they match. I am having problems setting a variable on the remote host where it can be read locally. Is this even possible - reading a... (1 Reply)
Discussion started by: berrean
1 Replies
Login or Register to Ask a Question