Operating System - OpenVMS
1819731 Members
3029 Online
109606 Solutions
New Discussion юеВ

SCP connection from Windows using pscp/winscp

 

SCP connection from Windows using pscp/winscp

Hello all,

On an OpenVMS system I have SSH running and a connection from Windows using Putty works fine. Now I like to transfer files between Windows and OpenVMS using winscp/pscp. Winscp is a Windows scp utility and pscp is a scp commandline utility that comes with Putty.

When I connect with Winscp (protocol: ssh) then a password is asked, but after I enter the password it comes with an error "Server unexpectedly closed the connection".

When I connect with Winscp (protocol: sftp) then a password is asked, after acceptance of the password a connection is made and a list of files is shown, however all directories are shown also as files (i.e. xxxx.dir;1) and when changing directory it fails.

When I connect with pscp with the following command:

pscp -v user@ip_address:a_file.txt test.txt

the file is copied to the Windows PC, but pscp uses sftp protocol.

When forcing to use scp:

pscp -v -scp -2 user@ip_address:a_file.txt test.txt

then a "Protocol error: Unexpected newline" is shown and no file is send.

How should I proceed to make this work.

Any help is mostly welcome.

Best regards,

Raymond
6 REPLIES 6
Richard Whalen
Honored Contributor

Re: SCP connection from Windows using pscp/winscp

You must use the sftp protocol. The SSH that comes with TCP/IP Services does not have a program to process the scp protocol.

The SFTP protocol is a file access protocol; the SCP protocol is basically RCP over SSH.

Re: SCP connection from Windows using pscp/winscp

Thanks for you reply Richard.

Now I understand taht only sftp protocol is supported, still my questions are not fully answered. In case of Winscp (with protocol set to sftp), changing directory does not work. All files/directories are listed as files, so a directory named xyz is shown as xyz.dir;1 and not recognized as a directory. What should I do to make this work?

Using pscp, I am not able to copy a file from a (sub)directory of OpenVMS (see my previous post). What is the syntax? An example would be great.

Best Regards,

Raymond Mouthaan
Richard Whalen
Honored Contributor

Re: SCP connection from Windows using pscp/winscp

I would suspect that there are some differences in interpretation of the specification between the code used in WinSCP and the SFTP server in TCP/IP Services that cause WinSCP to not recognize directories. Whether it is due to the .dir;1 on the files or the failure to set the directory flag I don't know. You didn't mention what version of TCP/IP Services you are running; this might be corrected in a later version. (I don't know, I don't work on TCP/IP Services; I work on MultiNet and TCPware.)

For PSCP I would suggest that you use a unix-like syntax for the destination directory. The SFTP protocols that file path names follow the Unix syntax. So, a command line like
pscp -v user@ip_adddress:dir1/dir2/a_file.txt test.txt
may work.

Process Software's SSH for OpenVMS product works correctly with WinSCP in SFTP mode, and pscp (see http://www.process.com/sshclients/index.html ).
Richard Whalen
Honored Contributor

Re: SCP connection from Windows using pscp/winscp

I brought up TCP/IP Services on one of my systems running VMS V8.3 and gave it a try with WinSCP and experienced what you saw - the directories are not displayed as folders and have .dir;1 on them. So WinSCP wasn't able to operate in anything other than the user's top level directory.

I did a connection with our (Process Software's) SFTP client and turned on debugging of file attributes returned and saw very few attributes returned. Though file protection is returned, the directory bit appears not to be set when getting directory information.

I was able to change directory with a command line interface, so working with a command line SFTP program may be your best bet.

Re: SCP connection from Windows using pscp/winscp

Hi Richard,

Thanks for trying, but we have decided to continue using FTP and Telnet.

If a solution comes up, I am still interested.

Regards,

Raymond

Re: SCP connection from Windows using pscp/winscp

I still had to close this one.

Ray