1748159 Members
3945 Online
108758 Solutions
New Discussion юеВ

SFTP issue

 
SOLVED
Go to solution
Mrityunjoy Kundu
Frequent Advisor

SFTP issue

we have genarated ssh keys and now we are able to connect remote server. But while sending data through sftp "lcd" to some local directory failed although they are exist on local server.

E-MS$ sftp
sftp> open AOLTRIO676@213.187.33.243
Opening connection to AOLTRIO676@213.187.33.243

sftp> I'm Robo-FTP Server 3.1.1.0
sftp> lcd /btn_cpe
/DISK$BCK/000000
sftp> lls
.
INCOMING.DIR;1
LOGFILES.DIR;1
PROCESSED.DIR;1
RECEIVED.DIR;1
VAT.DIR;1
WORKFILES.DIR;1
sftp> lcd /incoming
CD failed.
/DISK$BCK/000000
sftp> lcd INCOMING
PWD failed.
sftp>

We want to change local directory to incoming where we got "PWD failed" message.

Help!!!
9 REPLIES 9
Steven Schweda
Honored Contributor

Re: SFTP issue

> Help!!!

You first.

sftp "-V"

Who owns INCOMING.DIR, and what are its
protections? And who are you? And can you
SET DEFAULT to this directory (and see its
contents) before you run SFTP?

dire /owne /prot INCOMING.DIR
[...]

> sftp> lcd /incoming
> CD failed.

No big surprise there. "/" is not a very
well-defined thing on a VMS system.
P Muralidhar Kini
Honored Contributor

Re: SFTP issue

Hi,

>> sftp> lcd /incoming
>> CD failed.
>> /DISK$BCK/000000
>> sftp> lcd INCOMING
>> PWD failed.
>> sftp>

Have you also tried this
sftp> lcd /INCOMING

Regards,
Murali
Let There Be Rock - AC/DC
Shriniketan Bhagwat
Trusted Contributor

Re: SFTP issue

Hi,

Which version of TCP/IP are you using?
Looks like this issue has been fixed. Refer the below link:
http://h30266.www3.hp.com/masterindex/release_notes/release_notes_00c97bb0.txt

=====================================================
14-Mar-2005 Alpha and IA64

Problem:

The sftp lcd and lpwd commands issue the error "PWD failed."

Deliverables:

TCPIP$SSH_SFTP2.EXE

Reference:

PTR 70-5-2652, TCPIP_BUGS Note 3278
======================================================

Regards,
Ketan
Mrityunjoy Kundu
Frequent Advisor

Re: SFTP issue

Check when I tried with sftp -V, I can set def to the directory

E-MS$ sftp -v AOLTRIO676@213.187.33.243
Sftp2/SFTP2.C:4804: CRTL version (SYS$SHARE:DECC$SHARE ident) is: V7.3-2-03

SshFileCopy/SSHFILECOPY.C:1062: Making local connection.
Ssh2SftpServer/SSHFILEXFERS.C:2079: Received SSH_FXP_INIT
Ssh2SftpServer/SSHFILEXFERS.C:2124: version is 3
SshFileCopy/SSHFILECOPY.C:1001: Connection to local, ready to serve requests.
Sftp2/SFTP2.C:786: Connection ready.
SshReadLine/SSHREADLINE.C:3662: Initializing ReadLine...
SshFileCopy/SSHFILECOPY.C:1072: Connecting to remote host. (host = aoltrio676@213.187.33.243, user = NULL, port = NULL)
argv[0] = /sys$system/tcpip$ssh_ssh2
argv[1] = -v
argv[2] = -x
argv[3] = -a
argv[4] = -o
argv[5] = passwordprompt %U@%H's password:
argv[6] = -o
argv[7] = authenticationnotify yes
argv[8] = aoltrio676@213.187.33.243
argv[9] = -s
argv[10] = sftp
Sftp2/SFTP2.C:4012: notification: 0
Sftp2/SFTP2.C:4012: notification: 1

debug(17-JUN-2010 00:33:05.30): Ssh2/SSH2.C:1894: CRTL version (SYS$SHARE:DECC$SHR.EXE ident) is V7.3-2-03
debug(17-JUN-2010 00:33:05.30): SshAppCommon/SSHAPPCOMMON.C:313: Allocating global SshRegex context.
debug(17-JUN-2010 00:33:05.30): SshConfig/SSHCONFIG.C:3338: Metaconfig parsing stopped at line 4.
debug(17-JUN-2010 00:33:05.31): SshConfig/SSHCONFIG.C:855: Setting variable 'VerboseMode' to 'FALSE'.
debug(17-JUN-2010 00:33:05.31): SshConfig/SSHCONFIG.C:3246: Unable to open ssh2/ssh2_config
debug(17-JUN-2010 00:33:05.32): Connecting to 213.187.33.243, port 22... (SOCKS not used)
debug(17-JUN-2010 00:33:05.32): Ssh2/SSH2.C:2860: Entering event loop.
debug(17-JUN-2010 00:33:05.33): Ssh2Client/SSHCLIENT.C:1609: Creating transport protocol.
debug(17-JUN-2010 00:33:05.33): SshAuthMethodClient/SSHAUTHMETHODC.C:95: Added "publickey" to usable methods.
debug(17-JUN-2010 00:33:05.33): SshAuthMethodClient/SSHAUTHMETHODC.C:95: Added "password" to usable methods.
debug(17-JUN-2010 00:33:05.33): Ssh2Client/SSHCLIENT.C:1650: Creating userauth protocol.
debug(17-JUN-2010 00:33:05.33): client supports 2 auth methods: 'publickey,password'
debug(17-JUN-2010 00:33:05.33): SshUnixTcp/SSHUNIXTCP.C:1683: using local hostname EURO.cpwplc.net
debug(17-JUN-2010 00:33:05.33): Ssh2Common/SSHCOMMON.C:541: local ip = 10.144.77.152, local port = 58771
debug(17-JUN-2010 00:33:05.33): Ssh2Common/SSHCOMMON.C:543: remote ip = 213.187.33.243, remote port = 22
debug(17-JUN-2010 00:33:05.33): SshConnection/SSHCONN.C:2311: Wrapping...
debug(17-JUN-2010 00:33:05.33): SshReadLine/SSHREADLINE.C:3662: Initializing ReadLine...
debug(17-JUN-2010 00:33:05.35): Remote version: SSH-2.0-Robo-FTP Server 2.1.8.98
debug(17-JUN-2010 00:33:05.36): Ssh2Transport/TRCOMMON.C:1105: Sending packet with type 2 to connection
debug(17-JUN-2010 00:33:05.36): Ssh2Transport/TRCOMMON.C:1105: Sending packet with type 20 to connection
debug(17-JUN-2010 00:33:05.36): Ssh2Transport/TRCOMMON.C:1105: Sending packet with type 2 to connection
debug(17-JUN-2010 00:33:05.36): Ssh2Transport/TRCOMMON.C:1105: Sending packet with type 30 to connection
debug(17-JUN-2010 00:33:05.36): Ssh2Transport/TRCOMMON.C:2306: lang s to c: `', lang c to s: `'
debug(17-JUN-2010 00:33:05.36): Ssh2Transport/TRCOMMON.C:2371: c_to_s: cipher aes128-cbc, mac hmac-sha1, compression none
debug(17-JUN-2010 00:33:05.36): Ssh2Transport/TRCOMMON.C:2374: s_to_c: cipher aes128-cbc, mac hmac-sha1, compression none
debug(17-JUN-2010 00:33:05.37): Ssh2Transport/TRCOMMON.C:1105: Sending packet with type 2 to connection
debug(17-JUN-2010 00:33:05.37): Ssh2Transport/TRCOMMON.C:1105: Sending packet with type 30 to connection
debug(17-JUN-2010 00:33:05.49): Remote host key found from database.
debug(17-JUN-2010 00:33:05.50): Ssh2Transport/TRCOMMON.C:1105: Sending packet with type 2 to connection
debug(17-JUN-2010 00:33:05.50): Ssh2Transport/TRCOMMON.C:1105: Sending packet with type 21 to connection
debug(17-JUN-2010 00:33:05.50): Ssh2Transport/TRCOMMON.C:1105: Sending packet with type 2 to connection
debug(17-JUN-2010 00:33:05.50): Ssh2Transport/TRCOMMON.C:1105: Sending packet with type 5 to connection
debug(17-JUN-2010 00:33:05.51): Ssh2Transport/TRCOMMON.C:1105: Sending packet with type 2 to connection
debug(17-JUN-2010 00:33:05.51): Ssh2Transport/TRCOMMON.C:1105: Sending packet with type 50 to connection
debug(17-JUN-2010 00:33:05.51): Ssh2Common/SSHCOMMON.C:342: Received SSH_CROSS_STARTUP packet from connection protocol.
debug(17-JUN-2010 00:33:05.51): Ssh2Common/SSHCOMMON.C:392: Received SSH_CROSS_ALGORITHMS packet from connection protocol.
debug(17-JUN-2010 00:33:05.52): server offers auth methods 'password,publickey'.
debug(17-JUN-2010 00:33:05.52): Ssh2AuthPubKeyClient/AUTHC-PUBKEY.C:1677: adding keyfile "/USER_DISK/btn_batch/ssh2/ID_BTN_BATCH_EURO" to candidates
debug(17-JUN-2010 00:33:05.53): Ssh2Transport/TRCOMMON.C:1105: Sending packet with type 2 to connection
debug(17-JUN-2010 00:33:05.53): Ssh2Transport/TRCOMMON.C:1105: Sending packet with type 50 to connection
debug(17-JUN-2010 00:33:05.54): Constructing and sending signature in publickey authentication.
debug(17-JUN-2010 00:33:05.54): Ssh2AuthPubKeyClient/AUTHC-PUBKEY.C:869: ssh_client_auth_pubkey_send_signature: reading /USER_DISK/btn_batch/ssh2/ID_BTN_BATCH_EURO
debug(17-JUN-2010 00:33:05.64): Ssh2Transport/TRCOMMON.C:1105: Sending packet with type 2 to connection
debug(17-JUN-2010 00:33:05.64): Ssh2Transport/TRCOMMON.C:1105: Sending packet with type 50 to connection
Hello, I'm Robo-FTP Server 3.1.1.0
debug(17-JUN-2010 00:33:05.66): Ssh2AuthPubKeyClient/AUTHC-PUBKEY.C:1915: Public key authentication was successful.
debug(17-JUN-2010 00:33:05.66): Ssh2Common/SSHCOMMON.C:310: Received SSH_CROSS_AUTHENTICATED packet from connection protocol.
debug(17-JUN-2010 00:33:05.66): SshReadLine/SSHREADLINE.C:3728: Uninitializing RSftp2/SFTP2.C:4012: notification: 0

Sftp2/SFTP2.C:4029: read char: ASsh2Common/SSHCOMMON.C:852: num_channels now 1
Sftp2/SFTP2.C:4031: read_bytes: 1, buffer len: 1

debug(17-JUN-2010 00:33:05.66): Ssh2Transport/TRCOMMON.C:1105: Sending packet wiSftp2/SFTP2.C:4033: received message:
00000000: 41 A
Sftp2/SFTP2.C:4029: read char: U

debug(17-JUN-2010 00:33:05.66): Ssh2Transport/TRCOMMON.C:1105: Sending packet wiSftp2/SFTP2.C:4031: read_bytes: 2, buffer len: 2
Sftp2/SFTP2.C:4033: received message:
00000000: 4155 AU
Sftp2/SFTP2.C:4029: read char: T
Sftp2/SFTP2.C:4031: read_bytes: 3, buffer len: 3
Sftp2/SFTP2.C:4033: received message:
00000000: 4155 54 AUT
Sftp2/SFTP2.C:4029: read char: H
Sftp2/SFTP2.C:4031: read_bytes: 4, buffer len: 4
Sftp2/SFTP2.C:4033: received message:
00000000: 4155 5448 AUTH
Sftp2/SFTP2.C:4029: read char: E
Sftp2/SFTP2.C:4031: read_bytes: 5, buffer len: 5
Sftp2/SFTP2.C:4033: received message:
00000000: 4155 5448 45 AUTHE
Sftp2/SFTP2.C:4029: read char: N
Sftp2/SFTP2.C:4031: read_bytes: 6, buffer len: 6
Sftp2/SFTP2.C:4033: received message:
00000000: 4155 5448 454e AUTHEN
Sftp2/SFTP2.C:4029: read char: T
Sftp2/SFTP2.C:4031: read_bytes: 7, buffer len: 7
Sftp2/SFTP2.C:4033: received message:
00000000: 4155 5448 454e 54 AUTHENT
Sftp2/SFTP2.C:4029: read char: I
Sftp2/SFTP2.C:4031: read_bytes: 8, buffer len: 8
Sftp2/SFTP2.C:4033: received message:
00000000: 4155 5448 454e 5449 AUTHENTI
Sftp2/SFTP2.C:4029: read char: C
Sftp2/SFTP2.C:4031: read_bytes: 9, buffer len: 9
Sftp2/SFTP2.C:4033: received message:
00000000: 4155 5448 454e 5449 43 AUTHENTIC
Sftp2/SFTP2.C:4029: read char: A
Sftp2/SFTP2.C:4031: read_bytes: 10, buffer len: 10
Sftp2/SFTP2.C:4033: received message:
00000000: 4155 5448 454e 5449 4341 AUTHENTICA
Sftp2/SFTP2.C:4029: read char: T
Sftp2/SFTP2.C:4031: read_bytes: 11, buffer len: 11
Sftp2/SFTP2.C:4033: received message:
00000000: 4155 5448 454e 5449 4341 54 AUTHENTICAT
Sftp2/SFTP2.C:4029: read char: E
Sftp2/SFTP2.C:4031: read_bytes: 12, buffer len: 12
Sftp2/SFTP2.C:4033: received message:
00000000: 4155 5448 454e 5449 4341 5445 AUTHENTICATE
Sftp2/SFTP2.C:4029: read char: D
Sftp2/SFTP2.C:4031: read_bytes: 13, buffer len: 13
Sftp2/SFTP2.C:4033: received message:
00000000: 4155 5448 454e 5449 4341 5445 44 AUTHENTICATED
Sftp2/SFTP2.C:4029: read char:
Sftp2/SFTP2.C:4031: read_bytes: 14, buffer len: 14
Sftp2/SFTP2.C:4033: received message:
00000000: 4155 5448 454e 5449 4341 5445 4420 AUTHENTICATED
Sftp2/SFTP2.C:4029: read char: Y
Sftp2/SFTP2.C:4031: read_bytes: 15, buffer len: 15
Sftp2/SFTP2.C:4033: received message:
00000000: 4155 5448 454e 5449 4341 5445 4420 59 AUTHENTICATED Y
Sftp2/SFTP2.C:4029: read char: E
Sftp2/SFTP2.C:4031: read_bytes: 16, buffer len: 16
Sftp2/SFTP2.C:4033: received message:
00000000: 4155 5448 454e 5449 4341 5445 4420 5945 AUTHENTICATED YE
Sftp2/SFTP2.C:4029: read char: S
Sftp2/SFTP2.C:4031: read_bytes: 17, buffer len: 17
Sftp2/SFTP2.C:4033: received message:
00000000: 4155 5448 454e 5449 4341 5445 4420 5945 AUTHENTICATED YE
00000010: 53 S
Sftp2/SFTP2.C:4029: read char:

Sftp2/SFTP2.C:4031: read_bytes: 18, buffer len: 18
Sftp2/SFTP2.C:4033: received message:
00000000: 4155 5448 454e 5449 4341 5445 4420 5945 AUTHENTICATED YE
00000010: 530a S.
Sftp2/SFTP2.C:4038: buffer: 'AUTHENTICATED YES
'

debug(17-JUN-2010 00:33:05.67): Ssh2Transport/TRCOMMON.C:1105: Sending packet with type 2 to connection
debug(17-JUN-2010 00:33:05.67): Ssh2Transport/TRCOMMON.C:1105: Sending packet with type 98 to connection
debug(17-JUN-2010 00:33:05.67): Ssh2Transport/TRCOMMON.C:1105: Sending packet with type 2 to connection
debug(17-JUN-2010 00:33:05.67): Ssh2Transport/TRCOMMON.C:1105: Sending packet wiSshFileCopy/SSHFILECOPY.C:1001: Connection to remote host 'aoltrio676@213.187.33.243', ready to serve requests.
sftp>

sftp> lpwd
Ssh2SftpServer/SSHFILEXFERS.C:5061: Received SSH_FXP_REALPATH
Ssh2SftpServer/SSHFILEXFERS.C:5073: Resolving path to `'
Ssh2SftpServer/SSHFILEXFERS.C:5092: SSH_FXP_REALPATH: '' resolved to '/USER_DISK/btn_batch'
/USER_DISK/btn_batch

sftp> lcd btn_cpe
Ssh2SftpServer/SSHFILEXFERS.C:3196: Received SSH_FXP_STAT
Ssh2SftpServer/SSHFILEXFERS.C:3271: Statting file `btn_cpe/.'
Ssh2SftpServer/SSHFILEXFERS.C:5061: Received SSH_FXP_REALPATH
Ssh2SftpServer/SSHFILEXFERS.C:5073: Resolving path to `btn_cpe/'
Ssh2SftpServer/SSHFILEXFERS.C:5092: SSH_FXP_REALPATH: 'btn_cpe/' resolved to '/DISK$BCK/000000'
/DISK$BCK/000000

sftp> lls
SshFCRecurse/SSHFC_RECURSE.C:398: File is "raw", and it needs to be parsed.
Ssh2SftpServer/SSHFILEXFERS.C:3196: Received SSH_FXP_STAT
Ssh2SftpServer/SSHFILEXFERS.C:3271: Statting file `btn_cpe/.'
Ssh2SftpServer/SSHFILEXFERS.C:4043: Received SSH_FXP_OPENDIR
.
Ssh2SftpServer/SSHFILEXFERS.C:4399: Received SSH_FXP_READDIR
Ssh2SftpServer/SSHFILEXFERS.C:4426: Readdir on directory `btn_cpe/.' (handle=53b565)
Ssh2SftpServer/SSHFILEXFERS.C:4399: Received SSH_FXP_READDIR
Ssh2SftpServer/SSHFILEXFERS.C:4426: Readdir on directory `btn_cpe/.' (handle=53b565)
SshFCRecurse/SSHFC_RECURSE.C:331: Received error `EOF' (1).
INCOMING.DIR;1
LOGFILES.DIR;1
PROCESSED.DIR;1
RECEIVED.DIR;1
VAT.DIR;1
WORKFILES.DIR;1
sftp> Ssh2SftpServer/SSHFILEXFERS.C:2909: Received SSH_FXP_CLOSE
Ssh2SftpServer/SSHFILEXFERS.C:3013: Closed file `btn_cpe/.' (handle=53b565)
sftp> lcd incoming
Ssh2SftpServer/SSHFILEXFERS.C:3196: Received SSH_FXP_STAT
Ssh2SftpServer/SSHFILEXFERS.C:3271: Statting file `btn_cpe/incoming/.'
Ssh2SftpServer/SSHFILEXFERS.C:5061: Received SSH_FXP_REALPATH
Ssh2SftpServer/SSHFILEXFERS.C:5073: Resolving path to `btn_cpe/incoming/'
Ssh2SftpServer/SSHFILEXFERS.C:5076: SSH_FXP_REALPATH: 'btn_cpe/incoming/' failed
PWD failed.
sftp> lcd /btn_cpe/incoming
Ssh2SftpServer/SSHFILEXFERS.C:3196: Received SSH_FXP_STAT
Ssh2SftpServer/SSHFILEXFERS.C:3271: Statting file `/btn_cpe/incoming/.'
Ssh2SftpServer/SSHFILEXFERS.C:5061: Received SSH_FXP_REALPATH
Ssh2SftpServer/SSHFILEXFERS.C:5073: Resolving path to `/btn_cpe/incoming/'
Ssh2SftpServer/SSHFILEXFERS.C:5076: SSH_FXP_REALPATH: '/btn_cpe/incoming/' failed
PWD failed


------------------------

E-MS$ dir btn_cpe:[000000]/sec/prot

Directory DISK$BCK:[BTN_CPE.][000000]

INCOMING.DIR;1 [SALESREP,BTN_BATCH] (RWED,RWED,RWED,RWED)
LOGFILES.DIR;1 [SALESREP,BTN_BATCH] (RWE,RWE,RE,E)
PROCESSED.DIR;1 [SALESREP,BTN_BATCH] (RWE,RWE,RE,E)
RECEIVED.DIR;1 [SALESREP,BTN_BATCH] (RWE,RWE,RE,E)
WORKFILES.DIR;1 [SALESREP,BTN_BATCH] (RWE,RWE,RE,E)

E-MS$ dir DISK$BCK:[000000]BTN_CPE.dir/prot/owner

Directory DISK$BCK:[000000]

BTN_CPE.DIR;1 [SALESREP,BTN_BATCH] (RWE,RWE,RE,E)

Duncan Morris
Honored Contributor
Solution

Re: SFTP issue

Hi Joy,

please check the definition of btn_cpe - it should be a rooted directory ending in a full stop. If I remember correctly

disk$bck:[btn_cpe.]

Compare with the definitions of carre4, virgin_twn2 and and others in sylogicals.com.

Best wishes,

Duncan

Mrityunjoy Kundu
Frequent Advisor

Re: SFTP issue

Hi Duncan,

It has been already defined

(LNM$SYSTEM_TABLE)

"CARRE4" = "DISK$BCK:[CARREFOUR.]"

(LNM$SYSCLUSTER_TABLE)

(UNI_MAILBOXES_LIVEUK)
E-MS$ show lo btn_cpe
"BTN_CPE" = "DISK$BCK:[BTN_CPE.]" (LNM$SYSTEM_TABLE)
E-MS$ setuser btn_batch

Username: BTN_BATCH
Directory: USER_DISK:[BTN_BATCH]
UIC: [377,6707]
Account: SALESREP

E-MS$ show lo btn_cpe
"BTN_CPE" = "DISK$BCK:[BTN_CPE.]" (LNM$SYSTEM_TABLE)
Steven Schweda
Honored Contributor

Re: SFTP issue

> sftp "-V"

> Which version of TCP/IP are you using?

Do we need to pay for this information?

> Check when I tried with sftp -V, [...]

"-V" and "-v" are different. (And one of
them needs to be quoted.)
Mrityunjoy Kundu
Frequent Advisor

Re: SFTP issue

Thanks , the issue has been resolved .
P Muralidhar Kini
Honored Contributor

Re: SFTP issue

What was the solution ?

Regards,
Murali
Let There Be Rock - AC/DC