Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1105565
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T01:39:09+00:00 2026-05-17T01:39:09+00:00

I am trying to connect to a remote servre via FTP in my VB

  • 0

I am trying to connect to a remote servre via FTP in my VB 6.0 application.

I tried connecting to remote server using Inet but it gave status unknown error (code:120089). So I am trying to do this by batch file. I created a batch file as below:-

open 192.168.1.3 22  
root  
!@#%RedHat%)(*  
cd "/opt/test"  
put "C:\envars.exe" "envars.exe"  
bye  

( username is ‘root’ &
password is !@#%RedHat%)(*
)

I tried running the batch file from the command prompt as follows:-
C:>ftp -s:F:\testScript.txt

Now I am getting the following error:-
“ftp: connect : unknown error number”

Previously I was getting message,
“connected”
followed by,
” connection closed by remote host.”

However, I am able to connect to this server using Filezilla.

Please let me know if you are able to figure out what is the issue.

Thanks in advance
Sujit

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T01:39:10+00:00Added an answer on May 17, 2026 at 1:39 am

    Are you sure you want to be connecting to port 22? 21 is the usual FTP port.

    Additionally, you should try to execute that script manually (run ftp and type them in yourself) to see where the error occurs. It may be that your firewall is blocking return traffic in active mode (see if Filezilla is running in passive mode).


    Based on your comment, you’re definitely connecting to a secure FTP server. The ftp.exe program that comes with Windows only does standard FTP.

    A quick Google of "ftps client for windows" turns up many possibilities, one of which is a secure FTP client in Putty, a tool we use (and highly recommend) at work. Another is sftp that comes with CygWin.

    I don’t believe either of these allow you to specify a password other than interactively. They rightly assume that you’re using them for security purposes and having a password in plaintext in a script would render the security moot.

    Your best option is to set up shared keys the way SSH wants you to. That is the most secure way.

    However, if you’re more interested in ease of setup rather than security, you can just use expect to await the password prompt and then give your password to the SFTP program. CygWin also comes with expect (Putty doesn’t) so I’d suggest using that.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to connect to remote MySQL server with SSL from PHP using mysql_connect:
I am trying to connect to my mysql database on a remote server (via
I am trying to connect via an SSL socket to a remote server (ITunes
I am tring to connect a remote server via openvpn using C#. I am
I'am trying to connect to a remote server over ssh2 using the lib ch.ethz.ssh2.Connection
Well I am trying to connect to one remote server via socket, and I
I'm trying to connect to a remote MySQL server via SSH in my Java
When I am trying to connect to my SVN repository on some remote server
I am trying to connect to a remote oracle database server in Java with
I am trying to connect to a remote SQL server. I would like to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.