Curl linux12/21/2023 ![]() More InformationĬurl is a very versatile tool. The server returns a response showing the current OpenSSH version indicating the SSH server is active and running. The standard port for ssh is 22 but port 7822 is used by A2 Hosting managed servers. Text in red represents commands typed by the user: $ curl :7822 In this case we use the port number without the protocol. The following text shows a sample exchange between curl and a remote SSH server. However, you can still use curl to verify that the service is running on a server. Server port: 21.Ģ20-This is a private system - No anonymous loginĢ20-IPv6 connections are also welcome on this server.Ģ20 You will be disconnected after 15 minutes of inactivity.Įither response indicat the FTP server is active and running. $ curl :21Ģ20- Welcome to Pure-FTPd -Ģ20-You are user number 18 of 50 allowed.Ģ20-Local time is now 12:46. More detail is available by using the FTP port (21) without the FTP protocol. Text in red represents commands typed by the user: $ curl īecause a valid user name was not supplied, curl returns Access denied. The following text shows a sample exchange between curl and a remote FTP server. To test an FTP server, use curl to connect via ftp protocol or to port 21. The SMTP responses show the server is running and accepting requests. Text in red represents commands typed by the user: $ curl smtp://:2525 The following text shows a sample exchange between curl and a remote mail server using port 2525. Some ISPs block port the standard SMTP port (25) to help reduce spam on their networks.If you are testing connectivity to an A2 Hosting mail server, you can also use port 2525 or 587.įor example, to try and connect to SMTP on port 2525, add the optional port number at the end of the command. Text in red represents commands typed by the user: $ curl smtp://Ģ14 AUTH STARTTLS HELO EHLO MAIL RCPT DATA BDAT NOOP QUIT RSET HELP The following text shows a sample exchange between curl and a remote mail server. Use curl to try and connect via SMTP protocol The HTTP response confirms that the server is accepting connections and responding to requests. Text in red represents commands typed by the user: $ curl -IĬurl returns the entire content of the web page by default so in this example the -I option is added to return only the header. With curl, you can open a connection to a remote server on port 80 and get a response. Web server testing is probably the most common scenario for network troubleshooting. ![]() The following sections demonstrate how to do basic troubleshooting with curl. If this happens, you receive a message such as Connection refused or Connect failed. If this happens, curl may display some text from the server. When you try to establish a connection to a remote server, one of two things happens: For a complete list of assigned TCP port numbers and their associated protocols, please visit.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |