How to List Files in SSH
The secure shell, or SSH, command connects to remote computers running SSH servers. Users can use the terminal and execute commands on the remote computer from their computer. Secure shell sessions provide access to all the standard Linux and UNIX commands included on the system running the SSH server. You can list files in the current directory using the "ls" command, which works similarly to the "dir" command in the Windows command prompt.
Instructions
-
-
1
Connect to the computer running the SSH server by typing the command "ssh example.com" into the local terminal, replacing "example.com" with the address of the computer running the SSH server, and press "Enter."
-
2
Provide your user name and password for the remote system at the prompt.
-
-
3
Type "ls" at the SSH prompt and press "Enter" to view all non-hidden files and folders in the current directory.
-
1
Tips & Warnings
The "ls -l" command displays additional information about each file, including its size and the time it was last modified.
Use the "ls -R" command to list files recursively. The command will list all the files in the current directory and all the files in the folders and subfolders inside the current directory.
View hidden files with the "ls -a" command. Hidden files on Linux and UNIX begin with a period, or ".".
Use the "cd" command to change directories. Type "cd /path/to/directory," replacing "/path/to/directory" with your desired directory, and press "Enter."