I think found the answer.
The know_hosts file had vmpsilinuxtest, x.x.x.x
The request has to match exactly.
When I did the initial connection, if I would have done vmpsilinuxtest.pencor.com, then the known_host file would have contained this and this would have worked.
What are standards for doing the initial connection, server name or fully qualified server name.
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Steinmetz, Paul
Sent: Thursday, January 09, 2014 4:30 PM
To: 'Midrange Systems Technical Discussion'
Subject: RE: SFTP error when testing
I got this working, but this doesn't make sense.
I dropped .pencor.com from the @someuser.
Instead of
PAULS@xxxxxxxxxxxxxxxxxxxxxxxxx
Now
PAULS@vmpsilinuxtest
Keys are working, interactively connected to server via qp2term, sftp PAULS@vmpsilinuxtest.
Successfully put a file.
put /PAULS/PAULSTST.TXT                                      
Uploading /PAULS/PAULSTST.TXT to /home/PAULS/PAULSTST.TXT    
sftp>   
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Stefan Tageson
Sent: Thursday, January 09, 2014 3:37 PM
To: Midrange Systems Technical Discussion
Subject: RE: SFTP error when testing
Hi,
Have you added your id_rsa.pub file to the linux server configuration?
You can normally not use password verification when running in batch mode.
Must use rsa keys created by running 
	ssh-keygen -t rsa -N ""  
in qp2term.
Best regards
stefan.tageson@xxxxxxxx
M +46 732 369934
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Steinmetz, Paul
Sent: den 9 januari 2014 21:29
To: 'Midrange Systems Technical Discussion'
Subject: RE: SFTP error when testing
Now getting different error when trying SFTP to Linux test server in batch mode.
If I do it interactively using call qp2term, it works.
put /PAULS/PAULSTST.TXT                                      
Uploading /PAULS/PAULSTST.TXT to /home/PAULS/PAULSTST.TXT    
sftp>   
In batch,     
   Host key verification failed.   
                                               
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Steinmetz, Paul
Sent: Thursday, January 09, 2014 1:59 PM
To: 'Midrange Systems Technical Discussion'
Subject: RE: SFTP error when testing
Thanks John
On the destination LPAR, I had to change home directory for PAULS  from / to /home/PAULS.
Now working.
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of John McKee
Sent: Thursday, January 09, 2014 11:48 AM
To: Midrange Systems Technical Discussion
Subject: Re: SFTP error when testing
Maybe adding the verbose flag (-v) to sftp command might provide more information.
John McKee
On Thu, Jan 9, 2014 at 10:44 AM, Steinmetz, Paul <PSteinmetz@xxxxxxxxxx>wrote:
Getting the below error when testing SFTP from iSerie to iSeries
*NONE      Command                      01/09/14  11:03:55.148013  QCADRV
      QSYS        03BA     SFTPTEST    SYS         0020
                                      Message . . . . :     5600 - QSH
CMD('/QOpenSys/bin/sftp
 -b/home/PAULS/Paulssftptst.txt  PAULS@x.x.x.x')
 Permission denied (publickey,password,keyboard-interactive).
This process worked on 12/17, can't identify what changed.
No IPLs, No PTFs applied.
Keys and known hosts file appear ok.
12/17 successful test below.
  *NONE      Command                      12/17/13  15:27:28.598374
 QCADRV       QSYS        03BA     SFTPTEST    SYS         0020
                                      Message . . . . :     5200 - QSH
CMD('/QOpenSys/bin/sftp
 -b/home/PAULS/Paulssftptst.txt  PAULS@x.x.x.x')
         sftp> put /PAULS/PAULSTST.TXT /PAULS/PAULSTXT.TXT (replace 
Uploading /PAULS/PAULSTST.TXT to /PAULS/PAULSTXT.TXT  sftp>
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing 
list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, 
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take 
a moment to review the archives at 
http://archive.midrange.com/midrange-l.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: 
http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at 
http://archive.midrange.com/midrange-l.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: 
http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at 
http://archive.midrange.com/midrange-l.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: 
http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at 
http://archive.midrange.com/midrange-l.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: 
http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at 
http://archive.midrange.com/midrange-l.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: 
http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at 
http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.