Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question

migrated from Apr 29 '13 at 0:42

This question came from our site for professional and enthusiast programmers.

Use ssh for remote commands-:

ssh <username>@ip_address <command>


ssh  <username>@ip_address ls -l <dir>
share|improve this answer
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

You must log in to answer this question.