Sponsored Content
Full Discussion: FTP to other port than 21
Special Forums IP Networking FTP to other port than 21 Post 302320820 by ghostdog74 on Friday 29th of May 2009 04:15:10 AM
Old 05-29-2009
windows ftp client doesn't cut it. if you want, go download an ftp client for windows that support specifying a port number. Or, you can use a programming language such as Perl or Python with their ftp module. those modules allow you to specify connection with a different port. eg Python
Code:
#!/usr/bin/env python
import ftplib
server="localhost"
user="anonymous"
password="test@hotmail.com"
try:
    ftp = ftplib.FTP()
    ftp.connect(server,21)     #specify port number when connection
    ftp.login(user,password)
except Exception,e:
    print e
else:    
    ftp.cwd("incoming")    
    ftp.retrlines('LIST')

This User Gave Thanks to ghostdog74 For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

ftp port error

We are getting the following error while in the middle of an ftp with a remote server transfer.07-25-02-124529:425 Can't build data connection: Operation already in progress. This can happen in the middle of a successful connection... we might transfer several files successfully before and /... (3 Replies)
Discussion started by: MizzGail
3 Replies

2. UNIX for Advanced & Expert Users

FTP Port Number

On HP-UX 11 how do I get the port number of an active ftp connection? (2 Replies)
Discussion started by: mbb
2 Replies

3. IP Networking

ftp port listener

Hi, Anyone have any pointers on how I would go about creating some sort of listener (preferably, but not exclusively in Java) that would monitor an ftp port and react to arrival of a new file? Thanks in advance. Selma (2 Replies)
Discussion started by: Selma
2 Replies

4. UNIX for Dummies Questions & Answers

Any freeware ftp tool for telnet ( port 23 ) ?

Hi, I am connecting my remote unix servers using putty ( port 23, telent ). Right now I am doing ftp operation using command prompt. I would like to know the freeware ftp tool for telent ( port 23 ) which would give the interactive mode for ftpe operation. I know ther ftp tool like winScp... (4 Replies)
Discussion started by: thambi
4 Replies

5. SCO

Change FTP port UnixWare

Hi there, I have a client who wants to FTP to his server (UW7.1.4). He don't wants to use the standard 21 port but a differtent port like 8210. I added an extra ftp1line in the /etc/services and /etc/inetd.conf as same as the original ftp line. Restarted TCP/IP but when I connect with an... (0 Replies)
Discussion started by: p.vvugt
0 Replies

6. Linux

resticting user to login using putty on port 21(ftp)

Hi, I am having small query and wheather it is possible ? that user can transfer the files using ftp client examples (filezilla) , but he can not use putty to login using ftp and run the commands, Regards, Manoj (2 Replies)
Discussion started by: manoj.solaris
2 Replies

7. HP-UX

Enable ftp port

Hi Experts, Need your help in enabling the ftp port in HP-UX box. Is there any command/config file that needs to be changed? Also is it possible to open it only for few selected IPs only? (9 Replies)
Discussion started by: sai_2507
9 Replies

8. IP Networking

Ftp over SSH port forwarding

Hi, I'm trying to connect ftp over ssh port forwarding to a sever(UnixC) behind FireWall(F/W). here's my env and question. UnixA(SSH Client) ----F/W ---- UnixB(SSH Svr) ---- UnixC (FTP, 21) UnixA wants to connect ftp service of UnixC via SSH port forwarding on UnixB. Unix A,... (3 Replies)
Discussion started by: hanyunq
3 Replies

9. Shell Programming and Scripting

Specifying port for ftp when using .netrc

Hi, does anybody know if it is possible to specify a particular port for an FTP address within a .netrc file ? i have a script which opens the ftp to a machine and then instigates .netrc to login etc.. within .netrc i need it to go to a particular port to enable me to automate the dropping of... (2 Replies)
Discussion started by: forefather1977
2 Replies

10. UNIX for Beginners Questions & Answers

FTP file with a different port

I am using below code to ftp file and it errors out saying Servname not supported for ai_socktype ... if I do not use port number 2020 then it is not connected #!/bin/sh USER=$1 PASSWD=$2 server=$3 remoteFile=$4 localDir=$5 ftp -n -v << EOF open $server 2020 user $USER $PASSWD ascii cd... (4 Replies)
Discussion started by: eskay
4 Replies
IO::All::FTP(3pm)					User Contributed Perl Documentation					 IO::All::FTP(3pm)

NAME
IO::All::FTP - Extends IO::All to FTP URLs SYNOPSIS
use IO::All; "hello world " > io('ftp://localhost/test/x'); # save to FTP io('ftp//example.org/pub/xyz') > io('xyz'); # GET to file # two ways of getting a file with a password: $content < io('ftp://me:secret@example.org/xyz'); $content < io('ftp://example.org/xyz')->user('me')->password('secret'); DESCRIPTION
This module extends IO::All for dealing with FTP URLs. Note that you don't need to use it explicitly, as it is autoloaded by IO::All whenever it sees something that looks like an FTP URL. METHODS
This is a subclass of IO::All::LWP. The only new method is "ftp", which can be used to create a blank IO::All::FTP object; or it can also take an FTP URL as a parameter. Note that in most cases it is simpler just to call io('ftp//example.com'), which calls the "ftp" method automatically. OPERATOR OVERLOADING
The same operators from IO::All may be used. < GETs an FTP URL; > PUTs to an FTP URL. SEE ALSO
IO::All::LWP, IO::All, LWP. AUTHORS
Ivan Tubert-Brohman <itub@cpan.org> and Brian Ingerson <ingy@cpan.org> COPYRIGHT
Copyright (c) 2007. Ivan Tubert-Brohman and Brian Ingerson. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See <http://www.perl.com/perl/misc/Artistic.html> perl v5.10.0 2007-03-29 IO::All::FTP(3pm)
All times are GMT -4. The time now is 11:07 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy