Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 stackoverflow.com Apr 29 '13 at 0:42

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

1 Answer 1

Use ssh for remote commands-:

ssh <username>@ip_address <command>

E.g.

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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.