Operating System - OpenVMS
1748072 Members
5584 Online
108758 Solutions
New Discussion юеВ

Re: Not able to transfer file from VMS to Unix without using password

 
santoshpandey02
Occasional Advisor

Not able to transfer file from VMS to Unix without using password

Hello everyone,
I am not able to transfer file from VMS server to Unix server without using password. I have created private and public key using ssh_keygen2 utility and then created authorization and identification file in same [.ssh2] directory. Then I am starting the SSH-AGENT2 and SSH-ADD utility.

I am creating a .ssh2 directory (mkdir .ssh2) in Unix server and then using SCP2 command (SCP2 "username@IP address:.ssh2/") to transfer the public key to .ssh2 directory in Unix server.

Once file is transferred to unix server I am logging to Unix server and using following command for generating authorized key (ssh-keygen -i -f ID_DSA_2048_A.PUB >> authorized keys), which creates a file with name "authorized" in .ssh2 directory in Unix server.
Now I am using "SCP2 "username@Ip address of unix server:target directory/" in VMS server for file transfer and again getting promted for password.

I am not sure whether I am missing any step in between. Also I dont know whether its a configuration issue. Please help me.

Thanks in advance
Regards,
Santosh
14 REPLIES 14
Richard Whalen
Honored Contributor

Re: Not able to transfer file from VMS to Unix without using password

do the configuration files authorize public key authentication?

For the (VMS) client side [.SSH2]ssh2_config.
For the (Unix) server side it will sshd2_config. in the directory in which the SSH images live.
santoshpandey02
Occasional Advisor

Re: Not able to transfer file from VMS to Unix without using password

Hi Richard,

I have modified the ssh2_config. file by adding following line

AllowedAuthentications publickey, password

and sshd2_config file by adding

AllowedAuthentications publickey


Anything else I need to perform here?
Wim Van den Wyngaert
Honored Contributor

Re: Not able to transfer file from VMS to Unix without using password

Run scp2 with /debug=99 and post the result (in enclosure).

Did you make the private key well protected ?

Wim
Wim
santoshpandey02
Occasional Advisor

Re: Not able to transfer file from VMS to Unix without using password

Hi Wim,

thanks for your reply.

Both private and public key is protected using following command:

$ SET FILE/PROTECTION=(S,W,G,O:RW) ID_RSA_1024_A.;1

$ SET FILE/PROTECTION=(S,W:R,G,O) ID_RSA_1024_A.PUB;1

scp2 "-D 99" test1.dat "username@IP address":

Error Log:
===============
debug(22-APR-2008 17:17:29.16): SshADTList/SSHADT_LIST.C:454: Invoking callback @29cd0.
debug(22-APR-2008 17:17:29.16): SshADTList/SSHADT_LIST.C:454: Callback @29cd0 returned.
debug(22-APR-2008 17:17:29.16): SshADTList/SSHADT_LIST.C:419: Detach: handle=521b2c
debug(22-APR-2008 17:17:29.17): SshADTList/SSHADT_LIST.C:454: Invoking callback @29cd0.
debug(22-APR-2008 17:17:29.17): SshADTList/SSHADT_LIST.C:454: Callback @29cd0 returned.
debug(22-APR-2008 17:17:29.17): SshADTList/SSHADT_LIST.C:69: Reference to non-existent callback (doing nothing).
debug(22-APR-2008 17:17:29.17): SshADTList/SSHADT_LIST.C:419: Detach: handle=521b6c
debug(22-APR-2008 17:17:29.17): SshADTList/SSHADT_LIST.C:454: Invoking callback @29cd0.
debug(22-APR-2008 17:17:29.17): SshADTList/SSHADT_LIST.C:454: Callback @29cd0 returned.
debug(22-APR-2008 17:17:29.17): SshADTList/SSHADT_LIST.C:69: Reference to non-existent callback (doing nothing).
debug(22-APR-2008 17:17:29.17): SshADTList/SSHADT_LIST.C:69: Reference to non-existent callback (doing nothing).
debug(22-APR-2008 17:17:29.17): SshADTList/SSHADT_LIST.C:69: Reference to non-existent callback (doing nothing).
debug(22-APR-2008 17:17:29.17): SshADTList/SSHADT_LIST.C:69: Reference to non-existent callback (doing nothing).
debug(22-APR-2008 17:17:29.17): SshADTList/SSHADT_LIST.C:69: Reference to non-existent callback (doing nothing).
debug(22-APR-2008 17:17:29.17): SshADTMap/SSHADT_MAP.C:117: map cleared.
debug(22-APR-2008 17:17:29.17): SshADTMap/SSHADT_MAP.C:129: Reference to non-existent callback (doing nothing).
debug(22-APR-2008 17:17:29.17): SshConfig/SSHCONFIG.C:2794: Freeing pki. (host_pki = NULL, user_pki = NULL)
tcpip$ssh_scp2.exe:SshEventLoop/SSHUNIXELOOP.C:1302: Select.
tcpip$ssh_scp2.exe:SshEventLoop/SSHUNIXELOOP.C:627: Got signal number: 20
tcpip$ssh_scp2.exe:ssh_sigchld_real_callback
tcpip$ssh_scp2.exe:ssh_sigchld_process_pid: calling handler pid 118090 code 131
tcpip$ssh_scp2.exe: warning: child process (/sys$system/tcpip$ssh_ssh2) exited with code 131.


%TCPIP-E-SSH_FC_ERROR, error in ssh file transfer operation
===========================================
Please help me to find the solution. If you have any document with proper steps for setting the public key on unix server then you can send it to me.
Steven Schweda
Honored Contributor

Re: Not able to transfer file from VMS to Unix without using password

"Unix server" is not a complete (or useful)
description.

"VMS" is not any better.
TCPIP SHOW VERSION (or whatever works)
ssh "-V"

Many UNIX systems use a different directory,
and different key file formats, so simply
copying the VMS key files to "~/.ssh2" may
(probably will?) not work.

I'd also start with a simple SSH command,
like "ssh -v user@unix_host" rather than any
SCP command, until you get that much to work.

A forum search may find old threads showing
examples of using "ssh-keygen -X" or
"ssh-keygen -i" to import VMS-style,
SSH2-compatible format key data on the UNIX
system. (Or "man ssh-keygen".)
Hoff
Honored Contributor

Re: Not able to transfer file from VMS to Unix without using password

For reference and for completeness, this current thread originally started within the following thread:

http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1138560

santoshpandey02
Occasional Advisor

Re: Not able to transfer file from VMS to Unix without using password

Hi Hoff/Steven

Please find the steps which I have followed for the environment setup, please let me know what i have missed here,

========================================

SSH installation detail:

OpenVMS (version V7.3-2-03) - SSH-2.0-3.2.0 SSH Secure Shell OpenVMS V5.5 VMS_sftp_version 2

Unix - SSH-1.99-OpenSSH_4.2

Steps for environment setup:

Step 1.

Create public and private key,

$ ssh_keygen2

Passphrase :(Enter)
Again :(Enter)

will create following files in [.SSH2] directory,

ID_DSA_2048_A.;1 (Private)
ID_DSA_2048_A.PUB;1 (Public)

It is advisable to rename both the files by adding your login intial at the beggining of the file name (Only for identification purpose),

$ REN ID_DSA_2048_A.;1 SANTOSH_ID_DSA_2048_A
$ REN ID_DSA_2048_A.PUB;1 SANTOSH_ID_DSA_2048_A.PUB

Create IDENTIFICATION and AUTHORIZATION file,

$ Edit IDENTIFICATION

Add following line and save the file,

IDKEY SANTOSH_ID_DSA_2048_A

$ Edit AUTHORIZATION (This file is not required if the target server is UNIX)

Add following line and save the file,

KEY SANTOSH_ID_DSA_2048_A.PUB

Step 2:

.SSH directory created in home directory of Unix server (I have tried the same with .ssh2 directory but not able to get any success)

SCP2 is used to copy the public key from [.SSH2] to .SSH directory of Unix server

$ scp2 ID_DSA_2048_A.PUB "username@:.ssh/"

While copying It is prompting for password, as first time I am copying a file to target server (It is expected)

Step 3:

Login to Unix server and create authorized key using public key, which is copied from VMS server

$ cd .ssh
$ ssh-keygen -i -f id_dsa_2048_a.pub >> authorized_keys ( a file authorized_keys created in .ssh directory)


(I have tried the same using following command from VMS server without any success,
$ ssh "username@" ssh-keygen -i -f id_dsa_2048_a.pub >> .ssh/authorized_keys
)

Step 4:

Now from VMS server when I am copying any file to Unix server,

$ scp2 SFTP_COPY.TAKE "username@134.46.252.17:sftp_test/"

(Now, it should not prompt for the password as public key is already copied to the target server, but every time it is prompting for the password)

=========================================================================================================================

Queries:

1. Please let me know if I am missing any step here.
2. I have found here that SSH sercure shell is available on source but OpenSSH is available on target, Is that creating problem here?
3. Is there any extra setup is required in target server or source server?
4. I have tried the same with SFTP2 command but getting the same issue (prompted for the password each time).
5. I have tried through batch mode but it was failing (Using SFTP with batchfile as input).

Please provide the exact step for setting the environment and with configuration setting (if any extra setting is required)

=========================================
santoshpandey02
Occasional Advisor

Re: Not able to transfer file from VMS to Unix without using password

Please note that I have not renamed the public or private key with santosh_id_dsa_2048_a or santosh_id_dsa_2048_a.pub so you can consider only id_dsa_2048_a (private) and id_dsa_2048_a.pub (as public key)

Wim Van den Wyngaert
Honored Contributor

Re: Not able to transfer file from VMS to Unix without using password

Was the error log you posted complete ?
Nothing on Unix ?

Did you try to switch case in the username ?

Did you try using a IP name instead of address ?

http://www.openssh.com/faq.html#3.14 ?

Wim
Wim