1

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

migrated from stackoverflow.com Apr 29 '13 at 0:42

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

9

Use ssh for remote commands-:

ssh <username>@ip_address <command>

E.g.

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