![]() ![]() With regard to Abdull's comment about scp option order, what he suggests: scp -r some_directory -P 80. Update and aside to address one of the (heavily upvoted) comments: The Program Names for sockets belonging to other users will not be shown (i.e., will be hidden and a placeholder hyphen will be displayed, instead): Proto Recv-Q Send-Q Local Address Foreign Address State ID/Program name If you run netstat as a regular user (i.e., without sudo and assuming you don't have admin rights granted to you, via some other method), you will only see program names shown for sockets that have your UID as the owner. Tcp6 0 0 :::22 :::* LISTEN 888/sshd: /usr/sbinįor the above examples, sudo was used to run netstat with administrator privs, in order to be able to see all of the Program Names. Proto Recv-Q Send-Q Local Address Foreign Address State ID/Program name The output you will see, assuming your ssh daemon is configured with default values its listening ports, is shown below (with a little trimming of the whitespace in between columns, in order to get the entire table to be visible without having to scroll): Active Internet connections (only servers) Or, using the far more readable word based netstat option names: sudo netstat -tcp -numeric-ports -listening -program | grep sshd This question can be answered by using the netstat utility, as follows: sudo netstat -tnlp | grep sshd p Preserves modification times, access times, and modes from the original file.īonus Tip: How can I determine the port being used by the/an SSH daemon to accept SSH connections? Reserved for preserving the times and modes of the file in rcp(1). ![]() Note that this option is written with a capital 'P', because -p is already P port Specifies the port to connect to on the remote host. ![]() Here is an excerpt from scp's man page with all of the details concerning the two switches, as well as an explanation of why uppercase P was chosen for scp: The lowercase p switch is used with scp for the preservation of times and modes. # Use port 80 to bypass the firewall, instead of the scp default Unlike ssh, scp uses the uppercase P switch to set the port instead of the lowercase p: scp -P 80. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |