How to copy file from Windows to AIX using SCP?

Hi

I'd like to copy file ( or directory ) from a window server to an unix server using scp command, something like this

scp -rp admin@10.0.99.99:C:\Documents and Settings\abc.txt   /home/oracle/abc.txt

I tried testing something like command above but nothing worked.
Somebody help !! Thank you

For a start, you would need to quote the path that has spaces in it, but generally speaking just saying "it does not work" is not very helpful.

What does not work? How does it not work? What error do you get?

1 Like

Yeah, I missed it but it's not the point. I'll show you an example.

I executed this command from an aix server

scp -v -rp admin@10.0.95.29:C:\temp\abc.txt   /home/oracle/abc.txt

and this's the output

id_MISAP1:/home]scp -v -rp admin@10.0.95.29:C:\temp\abc.txt /home/oracle/abc.txt
Executing: program /usr//bin/ssh host 10.0.95.29, user admin, command scp -v -r -p -f -- C:tempabc.txt
OpenSSH_5.4p1, OpenSSL 0.9.8m 25 Feb 2010
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Failed dlopen: /usr/krb5/lib/libkrb5.a(libkrb5.a.so):   0509-022 Cannot load module /usr/krb5/lib/libkrb5.a(libkrb5.a.so).
        0509-026 System error: A file or directory in the path name does not exist.

debug1: Error loading Kerberos, disabling Kerberos auth.
debug1: Connecting to 10.0.95.29 [10.0.95.29] port 22.

After about 1 minute

debug1: connect to address 10.0.95.29 port 22: Connection timed out
ssh: connect to host 10.0.95.29 port 22: Connection timed out

It might suggest that there is a firewall preventing you connecting.

Can you simply connect with ssh to test this? If that fails to connect with similar message & time, check with the network people if port 22 is open for you.

Robin

1 Like

May be the port is the problem. I'll check it . Thanks guys

I have marked the part which is IMHO the culprit. Could you please post the result of an "lsuser <username>" where "<username>" is the name of the user on the AIX side?

My suspicion is that you are using either a generic Kerberos domain (which is unusual these days) for user authentication or authenticate against the AD (which basically is a kerberized, dumbed-down-to M$-standards LDAP domain) but you do not have the Kerberos client installed or configured.

If i am correct the commands output should contain "system=KRB5files". In this case you will have to install the Kerberos software, which is in separate packages which are not part of the standard install: "krb5.client.rte" (client software) and "krb5.lic" (license).

I hope this helps.

bakunin

1 Like

Could also simply be that the backslashes in the command are not escaped.

Excuse my stupid question...

are your sure there is a SSH Server running on your Windows server?
This is not a typical Windows application :slight_smile:

Regards