How to open a file in ssh

I know how to open file using gedit on desktop. How do you open a file in ssh when using Linux?

You need to use a text editor such as nano (easy for new users) or vim. The steps are follows to open a file:

  1. Log in using ssh:
    ssh user@server-name
  2. To show just file run:
    cat /path/to/file
  3. To edit or open a file named in the current directory, execute:
  4. Other options are:
    more filename
    less filename

See my FAQ:

Linux sysadmin blog - Linux/Unix Howtos and Tutorials - Linux bash shell scripting wiki