Can we login to putty with FTP details - ftp

I tried to login with putty to the Server with FTP details Hostname, Username and Password. But it says Access Denied when i entered the Paassword.
For my another Website i entered my hostname and click open in putty, it shows "Network Error: Connection timeout".
But the 2 sites can be opened in FTP client like Smart FTP. To access through putty shall i need any permission or what else may be the problem.
Where i can find Putty Details i.e., Username and Password to login to putty in SSL. I need to execute MYsql insttruction, do File transfer etc., Please show me link to learn some commands.

If you want to use Putty to login to an FTP server you need to do it manually. You need to set a RAW connection to port 21. Once connected you need to send USER, followed by username, and PASS followed by the password.
You can find more info on RFC959 http://www.faqs.org/rfcs/rfc959.html
If you want to try another ftp software, give a shot to WinSCP.

Putty is an SSH/Telnet client not an FTP client - different protocol, different TCP port. FTP is typically exposed since it's less risk - SSH can be much more dangerous and I would suspect blocked if you're seeing a connection timeout message.

Make sure to create a folder called billing and place all the putty exe's and batch files.
echo off
echo Starting PSFTP and Logging Into FTPSITE.ORG
psftp.exe username#FTP.org -pw "PASSWORD" -b "C:\BILLING\SITE.CMD"
echo %d%%t%
move /y "C:\Interface\Charges\BILLING.EXP" "C:\Interface\Charges\Sent\BILLING%d%%t%.EXP"
echo Done Uploading Billing Results and Moving Files
exit

Related

Copying files to an FTP server on AWC EC2 Windows server fails with "Unable to build data connection: The connection waiting time has expired"

We switched to to the AWS cloud with our local build machine. Now there is a batch file, which should upload a file via ftp. This worked fine locally, but not over the EC2 AWS machine.
C:\Programme\WinRAR\winrar a -afzip -IBCK -ep "Tool_%date:~-2%%date:~-7,2%%date:~-10,2%.zip" master
#echo Upload...
#echo open URL>ftp.txt
#echo USERNAME>>ftp.txt
#echo PASSWORD>>ftp.txt
#echo binary>>ftp.txt
#echo put TOOL_%date:~-2%%date:~-7,2%%date:~-10,2%.zip "/downloads/Tool%.zip">>ftp.txt
#echo quit>>ftp.txt
ftp -s:ftp.txt >out.txt
That does not work... I opened in the security groups settings: Inbound and Outbound ports 20-21, 1024-1048. It uploads the zip archive with 0 bytes.
The log file says:
ftp> open URL
Connection to URL was established.
220 FTP on server ready
200 UTF8 set to on
User (URL: (noone)):
331 Password required for USERNAME
230 user USERNAMElogged in
ftp> binary
200 type set to I
ftp> put Tool_180418.zip "/downloads/Tool_180418.zip"
200 PORT command successful
425 Unable to build data connection: The connection waiting time has expired
ftp> quit
221 goodbye.
Windows command-line ftp client supports FTP active mode only. To be able to use it, you have to open ports on your local Windows firewall. (And maybe outbound ports on the AWS instance.)
See my article on network configuration for FTP active and passive connection modes.
You better use another FTP client that supports an FTP passive mode, for which you seem to have everything set up correctly already.
For example, with WinSCP scripting, you can use a batch file like:
winscp.com /log=upload.log /command ^
"open ftp://username:password#ftp.example.com/" ^
"put TOOL_%%TIMESTAMP#ddmmyy%%.zip /downloads/*" ^
"exit"
There's even a guide for converting Windows ftp.exe script to WinSCP script.
WinSCP has also a built-in %TIMESTAMP% syntax, what the example above takes advantage of. It is more reliable than %date% and easier to use.
(I'm the author of WinSCP)
Unless you have specifically configured your FTP server to use the range 1024-1048 for file transfer, it will most likely be attempting to use ports in the range 1024-65535.
You need to either configure your FTP server so that it permits connections only in the permitted 24 port range, or else open your security group to the entire range.
Edit: have you seen this very useful answer ?

FTP from terminal if username contains #?

How do you connect to an FTP server from the command line if your username is your email address? Usually I login in like this:
ftp username#ftp.server.com
But if my username is an email address, it doesn't work:
ftp myname#mysite.com#ftp.server.com
I've tried using an escape character \#, and putting the username in quotes. Neither work. I looked in the man pages and searched Google to no avail.
Take a look to man ftp and you shoud use $HOME/.netrc file containing the username. See:
user User [Password] [Account] Identifies the local user (User)
to the remote FTP server. If the Password or Account parameter is not specified and the remote server requires it, the ftp command prompts for the password or account locally. If the Account parameter is required, the ftp command sends it to the remote server after the remote login process completes.

how to use a batfch file to log in to a router and then send commands to the router

I am attempting to write a batch file to open a telnet session , connect to router ,enter username and password and finally send a command to the router, I have two different routers I am attempting this with . one of them a netgear i can successfully unlock telnet on the router (it is locked by default and once unlocked ,reverts after reboot) open telnet session and connect to the router.to unlock telnet i have a program telnetenable.exe which is stored in c:/
echo off
echo c:/telnetenable.exe ipaddress username password
telnet ipaddress
but cant send a command to the router once at this point ,at which i have an open connection to the router and can enter cmd manually which is adslctl configure --snr x
but i would like to incorporate it into the batch file.
on the second router a speedstream 4200 telnet is not locked and i can open the telnet session and connect to router but cant enter username or password after which i want to be able to send a cmd.
echo off
telnet ipaddress
gets me as far as username request. can anyone help me with either of these problems.
many thanks.
Search for this free tool. Windows telnet can't be scripted.
Telnet Scripting Tool v.1.0 by Albert Yale

How to convert Windows FTP script to WinSCP?

I need to use WinSCP in my legacy vb6 code. I always used my script like this:
open ftp.myserver.com
myusername
mypassword
passive on
cd myfolder\
ascii
put C:\temp\test.xml test.xml
close
quit
Similar script (with little change) always worked for sslftp, psftp, etc.
Now I need to create script to make this WinSCP work but it keeps throwing "host not found error". I'm not even trying the script. I'm trying it on the command window.
winscp> open ftp.myserver.com
Searching for host...
Network error: Connection timed out.
same ftp works on regular command line ftp:
ftp> open ftp.myserver.com
Connected to myserver.
220 Gene6 FTP Server v3.10.0
User (...): myuser
331 Password required for myuser
Password:
230 User manager logged in.
How do I run WinSCP? The documentation doesn't show any such example.
WinSCP defaults to the SFTP protocol on the port 22. If you want to use the FTP, you need to specify that explicitly.
Also username and password come in session URL as part of the open command, not on separate lines. The passive mode is specified using the -passive=on switch.
open ftp://myusername:mypassword#ftp.myserver.com -passive=on
The ascii mode is specified using the -transfer=ascii switch of the put command (though the separate ascii command is also understood for compatibility):
put -transfer=ascii C:\temp\test.xml test.xml
It's the exit, not the quit.
See the complete guide for converting Windows FTP script to WinSCP.
You should also read the guide to automating file transfers to FTP server.

Batch script connect to ftp sever?

I am trying to connect to my ftp server by running a batch script. I can log into it fine by typing the following:
ftp home.ptd.net
USERNAME
PASSWORD
cd Public
put FILENAME.txt
bye
But if I put this into a script in this order, it connects to the server, but still asks for a username. Can anyone point me in the right direction on how to make it login? Thanks.
please see the following msdn article:
ftp reference from msdn
i think you need to place the commands in a text file and pass it to the ftp command with the -s parameter

Resources