I know of the scp command to copy files from my local machine to a remote machine. What is a similar command to view the directories in a remote machine? I mean a

 ls -l

shows the files in my local unix machine. How can I view the directories in a remote unix machine? I tried

ls -l <username>@ip_address

but doesn't work


Use ssh for remote commands-:

ssh <username>@ip_address <command>


ssh  <username>@ip_address ls -l <dir>
  • 3
    You could even do ssh username@remotehost then type interactive commands on the remotehost terminal; type exit to quit the remote shell and get back to the local machine. – Basile Starynkevitch Apr 28 '13 at 20:02

Your Answer

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