2

From my local machine, which command can tell me which machines I have connected via ssh, or ftp, etc? At the same time, which command can let me know which machines have tried to connect my machine via these different network protocols?

2

To check which port or address your computer is connected to try

sudo lsof -i
sudo netstat -l
2
  • 2
    The OP could also use ss (socket status) to see current connections.
    – Schives
    Mar 14 '17 at 23:17
  • @Schives you are right sudo netstat ss displays current connections. Mar 15 '17 at 9:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.