Server Fault is a question and answer site for system and network administrators. 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

In UNIX, how can I cat a file located in a different server? Can anybody please help me?

Thanks, Prasenjit

share|improve this question

With SSH, you can connect to a remote server and use cat remotely:

ssh remote_server cat file_name

With NFS, you can mount a remote file-system and use cat locally:

cat /nfs_mount/file_name
share|improve this answer

ssh into the server (ssh username@serverip) and then cat it?

Mount the filesystem with sshfs and cat it right from your workstation?

What exactly are you trying to achieve in catting it? Like you need to check something periodically, track something, just want to read a file that's not on your server...? Is it a system file or can you keep it in a file share of some sort? The question is kind of vague since there's a number of ways to just read a file on another system. It would help to know the circumstances and what options you have available (for example, there's no way you can simply "cat remotefile@server" in order to view it, so if you can read a file that's on a file share that you can mount or if you can secure shell into the remote system with ssh or etc. etc. would be helpful).

If you frame this as an objective there may be an alternative available. For example, if you're trying to read a remote logfile, maybe your server can be configured to send log messages to your workstation, or you can use rsync to periodically "send" your files to another workstation or email you with notifications of important messages.

share|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.