The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

SSH comands

Discussion in 'General Discussion' started by toplevelhost, Oct 19, 2002.

  1. toplevelhost

    toplevelhost Member

    Joined:
    Aug 1, 2002
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Does anybody know where I can find a list of ssh comands, and or maybe some instructions on how to use.


    Thanks
     
  2. mikerayner

    mikerayner Well-Known Member

    Joined:
    Apr 10, 2002
    Messages:
    192
    Likes Received:
    0
    Trophy Points:
    16
    [quote:39f99bdd21][i:39f99bdd21]Originally posted by toplevelhost[/i:39f99bdd21]

    Does anybody know where I can find a list of ssh comands, and or maybe some instructions on how to use.


    Thanks[/quote:39f99bdd21]
    by reading Linux Administration Book
     
  3. haze

    haze Well-Known Member

    Joined:
    Dec 21, 2001
    Messages:
    1,550
    Likes Received:
    3
    Trophy Points:
    38
    [quote:b6124e713f][i:b6124e713f]Originally posted by mikerayner[/i:b6124e713f]

    [quote:b6124e713f][i:b6124e713f]Originally posted by toplevelhost[/i:b6124e713f]

    Does anybody know where I can find a list of ssh comands, and or maybe some instructions on how to use.


    Thanks[/quote:b6124e713f]
    by reading Linux Administration Book[/quote:b6124e713f]
    I agree with the above. Also, I have a few basic commands listed in the faq on our web site: http://iminteractive.net/faqmanager.cgi?file=ssh&toc=faq#q1
     
  4. nitromax

    nitromax Well-Known Member

    Joined:
    Feb 12, 2002
    Messages:
    189
    Likes Received:
    0
    Trophy Points:
    16
    Here's a few SSH commands....


    cd /home/whatever
    dir = ls or ls -la
    copy = cp
    move = mv
    delete = rm
    delete tree = rm -r
    make directory = mkdir
    remove directory = rmdir

    A few notes on the Unix filesystem.
    -CAUTION: Unix gives very few warning messages about manipulating files. Eg. if you
    tell the system to delete all files or a large directory tree it will.
    -Unix uses the slash '/' whereas dos uses the backslash ''
    -Filenames have no limit on their length.
    -Files may have multiple extensions greater than 3 characters each
    (eg. backup.domains.012398)

    Useful Unix Commands

    ps=Show processes. Displays all active programs you are currently running. (Others - ps -aux, ps -axj, ps -axl )

    df=Device free. Shows hard drive usage.

    du=Disk Usage. (Others - du -h, du -hc)

    who=Who. Shows all users currently logged onto this server.

    w=Who, but shows a little more.

    finger=Finger. Similar to who. May be given a username as a parameter in order to get information about that user. For example finger &username&.

    ctrlz=Stops the current program/job.

    ctrlc=Stops and kills the current program.

    kill=Kill. Requires a process number as a paramenter in the form of kill %&processnumber&.
    For example kill%1. USE WITH CAUTION, or better yet, simply always do a ctrl c.

    su=Set User. Allows you to have root access on systems where you do not recieve it automatically at logon.
    SU will prompt you to enter the root password. You may also use the command to 'assume' the identity of
    any system user. For example, su jean. This can be useful for testing purposes.

    ./=Run. &./& is the unix equivalent of a run command. The syntax is: ./&programname&

    tar=tar. Tar is a program which combines directories and their files into one single file archive. This archive is typically compressed. It is useful when relocating a user or domain to another server. The
    two most common usages of this command are illustrated below:

    tar cvfz filename.tar.gz * (This will create an archive of all files and directories branching off of this directory, inclusive. Tar will copy symbolic links, but not what they link too.)

    tar xvfz filename.tar.gz (This explodes the tarred file created above)

    rcp=Remote Copy. This command allows you to copy a file from one server to another, without having to manually ftp it. The syntax is:
    rcp filename &fulldomainname of server&:&fulldirectory path of file&

    eg. rcp filename.tar.gz tlg.yourwebhost.com:/www/htdocs/jean/

    grep=grep. Grep allows you to search a file or even a whole directory for a specified string. The syntax is
    grep &string& &filename&. Eg. grep jean /etc/domainalias. This would look for the string 'jean' in the file /etc/domainalias.

    ftp=File Transfer Protocol. FTP is a program used to exchange files between servers. It is invoked by typing ftp. It can accept a hostname as a parameter, eg. ftp yourwebhost.com.

    telnet=Telnet. Telnet is a program used to logon to another server. It is typically invoked with the following syntax: telnet &hostname&.

    lynx=Lynx. Lynx is a text based web browser. It is useful for checking to see that new accounts have been properly setup. Lynx is typically invoked with a url as a parameter. For example: lynx espn.com

    Misc: Symbolic Links. A symbolic link, is a link to a file or directory. For example you can typically access the directory /usr/home/jean by typing cd /home/jean. This is because a symbolic link exists which
    directs /usr to /usr/home. All new accounts have symbolic links in their /usr/home/username directories.
    One of these is to www. The symbolic link www points to /www/htdocs/domainname. Thus, if
    a user logs on, and types cd www, he will actually be in the directory /www/htdocs/domainname.


    VI: A Brief Summary

    VI stands for visual editor. It is the most commonly used means of editing files on unix servers. It is typically invoked by typing: vi &filename&. If the file exists it will be opened for editing. If the file does
    not exist, it will be created (note it must be saved before it will actually exist).

    Commands
    esc=command mode
    i=insert before
    a=insert after
    shift+a=insert at end of line
    shift+g=goto end of file (special use: While in command mode type a line number, then hit shift+g. This will goto the line number typed)
    ctrl+f=scroll forward one page
    ctrl+b=scroll back one page
    /=search. (special use: After typing / enter the string you wish to search for and press enter.)
    :=While in command mode, pressing colon allows you access to the following commands:
    w=write (saves file)
    q=quit (exits vi)
    wq=write quit(saves file and exits vi)
    q!=exits vi without saving
    (escape returns to command mode)
     
  5. ThunderHostingDotCom

    ThunderHostingDotCom Well-Known Member

    Joined:
    Nov 18, 2002
    Messages:
    450
    Likes Received:
    1
    Trophy Points:
    16
    Location:
    All over!
    [quote:231fa61b9a][i:231fa61b9a]Originally posted by nitromax[/i:231fa61b9a]


    Here's a few SSH commands....


    cd /home/whatever
    dir = ls or ls -la
    copy = cp
    move = mv
    delete = rm
    delete tree = rm -r
    make directory = mkdir
    remove directory = rmdir

    A few notes on the Unix filesystem.
    -CAUTION: Unix gives very few warning messages about manipulating files. Eg. if you
    tell the system to delete all files or a large directory tree it will.
    -Unix uses the slash '/' whereas dos uses the backslash ''
    -Filenames have no limit on their length.
    -Files may have multiple extensions greater than 3 characters each
    (eg. backup.domains.012398)

    Useful Unix Commands

    ps=Show processes. Displays all active programs you are currently running. (Others - ps -aux, ps -axj, ps -axl )

    df=Device free. Shows hard drive usage.

    du=Disk Usage. (Others - du -h, du -hc)

    who=Who. Shows all users currently logged onto this server.

    w=Who, but shows a little more.

    finger=Finger. Similar to who. May be given a username as a parameter in order to get information about that user. For example finger &username&.

    ctrlz=Stops the current program/job.

    ctrlc=Stops and kills the current program.

    kill=Kill. Requires a process number as a paramenter in the form of kill %&processnumber&.
    For example kill%1. USE WITH CAUTION, or better yet, simply always do a ctrl c.

    su=Set User. Allows you to have root access on systems where you do not recieve it automatically at logon.
    SU will prompt you to enter the root password. You may also use the command to 'assume' the identity of
    any system user. For example, su jean. This can be useful for testing purposes.

    ./=Run. &./& is the unix equivalent of a run command. The syntax is: ./&programname&

    tar=tar. Tar is a program which combines directories and their files into one single file archive. This archive is typically compressed. It is useful when relocating a user or domain to another server. The
    two most common usages of this command are illustrated below:

    tar cvfz filename.tar.gz * (This will create an archive of all files and directories branching off of this directory, inclusive. Tar will copy symbolic links, but not what they link too.)

    tar xvfz filename.tar.gz (This explodes the tarred file created above)

    rcp=Remote Copy. This command allows you to copy a file from one server to another, without having to manually ftp it. The syntax is:
    rcp filename &fulldomainname of server&:&fulldirectory path of file&

    eg. rcp filename.tar.gz tlg.yourwebhost.com:/www/htdocs/jean/

    grep=grep. Grep allows you to search a file or even a whole directory for a specified string. The syntax is
    grep &string& &filename&. Eg. grep jean /etc/domainalias. This would look for the string 'jean' in the file /etc/domainalias.

    ftp=File Transfer Protocol. FTP is a program used to exchange files between servers. It is invoked by typing ftp. It can accept a hostname as a parameter, eg. ftp yourwebhost.com.

    telnet=Telnet. Telnet is a program used to logon to another server. It is typically invoked with the following syntax: telnet &hostname&.

    lynx=Lynx. Lynx is a text based web browser. It is useful for checking to see that new accounts have been properly setup. Lynx is typically invoked with a url as a parameter. For example: lynx espn.com

    Misc: Symbolic Links. A symbolic link, is a link to a file or directory. For example you can typically access the directory /usr/home/jean by typing cd /home/jean. This is because a symbolic link exists which
    directs /usr to /usr/home. All new accounts have symbolic links in their /usr/home/username directories.
    One of these is to www. The symbolic link www points to /www/htdocs/domainname. Thus, if
    a user logs on, and types cd www, he will actually be in the directory /www/htdocs/domainname.


    VI: A Brief Summary

    VI stands for visual editor. It is the most commonly used means of editing files on unix servers. It is typically invoked by typing: vi &filename&. If the file exists it will be opened for editing. If the file does
    not exist, it will be created (note it must be saved before it will actually exist).

    Commands
    esc=command mode
    i=insert before
    a=insert after
    shift+a=insert at end of line
    shift+g=goto end of file (special use: While in command mode type a line number, then hit shift+g. This will goto the line number typed)
    ctrl+f=scroll forward one page
    ctrl+b=scroll back one page
    /=search. (special use: After typing / enter the string you wish to search for and press enter.)
    :=While in command mode, pressing colon allows you access to the following commands:
    w=write (saves file)
    q=quit (exits vi)
    wq=write quit(saves file and exits vi)
    q!=exits vi without saving
    (escape returns to command mode)[/quote:231fa61b9a]


    WOW, that helps me quite a bit! THANK YOU!
     
Loading...

Share This Page