Need to know if there are ftp connections in my machine


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Need to know if there are ftp connections in my machine
# 1  
Old 01-12-2012
Need to know if there are ftp connections in my machine

Hello,

I need to know if there are ftp connections in my machine.

How can I find out that?any commands to use?

PS: i know how to find which users are on my machine now by using #who -r



regards
# 2  
Old 01-12-2012
Not sure what OS you're using but if you have 'lsof' command available this will work:

Code:
lsof -i :<service port number>

i.e. for ftp
lsof -i :21

Hope this helps.
# 3  
Old 01-12-2012
If you mean "Who can open an ftp from my machine" then the list is probably anyone who can get to the command line. Depending what access they have depends what they can transfer.

If you mean "Who can open an ftp to my machine" then it becomes a little easier. Consider all your user accounts. You can prevent them having ftp access to your server by adding entries in /etc/ftpusers Peversely this is a list of those who are not allowed access. We keep a list of those who are and runa scheduled job to get everyone from /etc/passwd not in the allowed list and write them to /etc/ftpusers



Additionally, the ftpd can help you with logging too. Depending on your operating system, there may well be a debug flag you can set in /etc/inetd.conf (and refresh inetd, see man inetd.conf) so that all traffic gets logged with syslog. You can set it up to show both connections going from your server and those coming in. You have to remember that files can be moved both ways, so you can set logging to record which files and their direction too.

This is all dependant on the version of OS you have, so I can't be specific as a first bash.




I hope that this helps, but please post again to let us all know how you get on and what you have set up so that others may learn.



Robin
Liverpool/Blackburn
UK
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to do ftp from UNIX to windows machine?

hi, i am using ftp command to transfer files from unix server to windows server using a web interface. there is a shell script which is called by the web page which executes a ftp command which (ftp) tries to connect to the windows machine and asks for username and password. so in order to... (6 Replies)
Discussion started by: Little
6 Replies

2. Linux

Unable to connect to Server machine from a client machine using ftp service

Hi, Could you please help me with the below issue.. I'm running RHEL6 OS on both server (192.168.0.10) and client machines (192.168.0.1). I'm trying to connect to server from the client machine using ftp service. I have installed vsftpd daemon on both the machines. I'm getting... (4 Replies)
Discussion started by: raosr020
4 Replies

3. UNIX for Advanced & Expert Users

FTP While transfering files to local machine to remote machine

Hi Am using unix Ksh Am getting the problem while transferring zero size files through the script . When i transfer zero size files from local machine to remote machine manually i can able to do it . My question its beause of zero size files am not able to transfer through script ? or its... (2 Replies)
Discussion started by: Venkatesh1
2 Replies

4. UNIX for Advanced & Expert Users

Not logging ftp connections in /var/adm/wtmpx file (in last command output)

Hi all, I have F5 load balancer on my system and checking service status by opening an ftp session in every 30 seconds. These ftp sessions are being logged in /var/adm/wtmpx and filling up the file. when i run the last command most of the output is this ftp session. I was wondering if there is a... (1 Reply)
Discussion started by: cepxat
1 Replies

5. AIX

How to list the current ftp connections?

Hello, I need to know How to list the ""current"" ftp connections? the machine is AIX 6.1 Regards Ahmed Amer Cairo,Egypt (5 Replies)
Discussion started by: ahmedamer12
5 Replies

6. Shell Programming and Scripting

want to make same machine as ftp

Hi, I have been acces to unix box , I HAVE BEEN ALLOTED A URL AND USERID ALONG WITH PASSWORD ,and thru putty i acess to that unix machine ...Now I want same machine to be used as ftp server can I do that...?actually no seprate ftp server acess is given to me and now i want to test some ftp... (1 Reply)
Discussion started by: rahul125
1 Replies

7. Programming

FTP - reusing data connections

Hi there, This may be a stupid question, but... Is it possible to use one data connection channel initiated on a FTP server for sending multiple commands (LIST, NLST, MLSD)? Thanks in advance! (1 Reply)
Discussion started by: Yezu
1 Replies

8. AIX

loggin incoming ftp connections in syslog

Hello, we recently configured syslog on one of our machines with the following line in /etc/syslog.conf *.info /audit/syslog.log rotate time 1d compress However it does not seem to be logging incoming ftp connections, only outgoing ftp connections? Is there a way to log incoming ftp... (2 Replies)
Discussion started by: zuessh
2 Replies

9. Windows & DOS: Issues & Discussions

ftp connect from unix to NT machine

I've read some of the threads on here about ftping. It seems most relate to ftp-ing from one unix environment to another. What I'm looking for is a way to ftp files from unix out to an windows NT machine that is connected to a network. If anyone has a simple or complex example, I would sure... (8 Replies)
Discussion started by: anthreedhr
8 Replies

10. BSD

ipfw slow ssh and ftp connections

just as the title says. thanks. #General Rule Sets /sbin/ipfw add 0300 check-state /sbin/ipfw add 0301 deny tcp from any to any in established /sbin/ipfw add 0302 pass tcp from any to any out setup keep-state /sbin/ipfw add 0303 pass udp from any to any out #SSH FTP /sbin/ipfw add 0400... (11 Replies)
Discussion started by: dwildgoose
11 Replies
Login or Register to Ask a Question