Discuss (FTP), (FTP on .NET CF) and (FTPS, SFTP and SCP).
no avatar
User

JamesSmyth

Posts

8

Joined

Fri Apr 10, 2009 12:13 pm

Handling SFTP Password expiration/change

by JamesSmyth » Fri Feb 18, 2011 10:26 am

I'd like to handle the password expiration/change process of an SFTP connection. I didn't think there would be any general methods for this, but I had assumed I would at least be able to detect/parse the prompts and send text via low-level SFTP commands. Now that I look/think about SFTP I'm not sure this is possible. In fact, I don't even see how I can send low-level commands, or access the actual text response, at all in the FTPConnection (or derivative) classes. I am using EdtFTPnetPRO version 6.3.0.20.

Does anyone have any advice on this? Particularly if there is an easier method that I haven't been able to find. The more I think about it, the more I wonder if there shouldn't be methods in the API for this.

I am using the .NET libraries for production system, but wanted to show an example (via command-line) of the interaction below.

Thanks,
James Smyth

[user1@nix.domain.com]/dir1/dir2> sftp SOMEUSER@X.Y.Z.W
Connecting to X.Y.Z.W...

Password:
Your password has expired. Choose a new password.
Old Password:
New password:
Re-enter new password:
sftp> quit
[user1@nix.domain.com]/dir1/dir2>
no avatar
User

support2

Posts

3987

Joined

Tue May 18, 2004 8:30 am

Re: Handling SFTP Password expiration/change

by support2 » Fri Feb 18, 2011 4:20 pm

It's certainly possible to do, although it will require some code changes (for us I mean).

It'd be very helpful if you posted the log when using extra debug:

sftp -vvv SOMEUSER@X.Y.Z.W

That would ensure that we can confirm what messages this server is sending you.
no avatar
User

JamesSmyth

Posts

8

Joined

Fri Apr 10, 2009 12:13 pm

Re: Handling SFTP Password expiration/change

by JamesSmyth » Sat Feb 19, 2011 9:56 am

no avatar
User

support2

Posts

3987

Joined

Tue May 18, 2004 8:30 am

Re: Handling SFTP Password expiration/change

by support2 » Sat Feb 19, 2011 3:13 pm

no avatar
User

JamesSmyth

Posts

8

Joined

Fri Apr 10, 2009 12:13 pm

Re: Handling SFTP Password expiration/change

by JamesSmyth » Tue Feb 22, 2011 4:25 am

no avatar
User

support2

Posts

3987

Joined

Tue May 18, 2004 8:30 am

Re: Handling SFTP Password expiration/change

by support2 » Tue Feb 22, 2011 7:42 am

no avatar
User

JamesSmyth

Posts

8

Joined

Fri Apr 10, 2009 12:13 pm

Re: Handling SFTP Password expiration/change

by JamesSmyth » Tue Feb 22, 2011 8:44 am

no avatar
User

support2

Posts

3987

Joined

Tue May 18, 2004 8:30 am

Re: Handling SFTP Password expiration/change

by support2 » Tue Feb 22, 2011 2:29 pm


Who is online

Users browsing this forum: No registered users and 23 guests

Powered by phpBB ® | phpBB3 Style by KomiDesign
cron