Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi all! We have been experiencing an issue on site where threads have been missing the latest postings. The platform host Vanilla are working on this issue. A workaround that has been used by some is to navigate back from 1 to 10+ pages to re-sync the thread and this will then show the latest posts. Thanks, Mike.
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

SSH into Server

  • 20-07-2006 11:13am
    #1
    Registered Users, Registered Users 2 Posts: 3,514 ✭✭✭


    I need to edit some files in my apache conf folder which is located on my server. I need to SSH into the server and, i presume, run a command to download the file, edit it locally and finally upload it to the same directory.

    Within my hosting control panel, plesk 8, i have created a SSH account, however it gives me the following account options:
    /bin/sh
    /bin/bash
    /sbin/nologin
    /bin/tcsh
    /bin/csh
    /bin/bash (chrooted)
    /bin/rbash

    Which one should i choose to be able to have full access to the conf folder?

    Also does anyone know what commands i should be using to edit the file?


Comments

  • Closed Accounts Posts: 6,151 ✭✭✭Thomas_S_Hunterson


    you dont need to edit it locally, just use vi on the server itself. Make a backup of the original file before you do anything though.
    btw, you will need whatever privelages are necessary to edit the file

    vi [filename]


  • Closed Accounts Posts: 600 ✭✭✭junii


    Select /bin/bash . Then SSH in and edit the file with vi or nano as sean_keevey says.


  • Registered Users, Registered Users 2 Posts: 3,514 ✭✭✭Rollo Tamasi


    thanks guys, i'm a bit lost with this ssh lark.
    do i need to cd into the correct dir before doing that vi command?
    how do i backup the file before i edit it? what is the command for that?


  • Closed Accounts Posts: 6,151 ✭✭✭Thomas_S_Hunterson


    thanks guys, i'm a bit lost with this ssh lark.
    do i need to cd into the correct dir before doing that vi command?
    how do i backup the file before i edit it? what is the command for that?
    You can either cd into the correct directory and use:

    vi [filename]

    or else just use

    vi [filepath][filename]

    whichever works for you!
    To backup the file use

    cp [filename] [filename].bak

    /edit: as bedlam pointed out


  • Registered Users, Registered Users 2 Posts: 37,485 ✭✭✭✭Khannie


    Jaysus lads....the lad doesn't know what vi is and you're advising him to use it. At least nano gives you some instructions on-screen.

    Rollo: You need to learn how to use vi before you can use it. I hated it for about 10 years for that reason. Have a google for a vi tutorial.

    if in doubt:
    esc
    :q!
    <enter>

    will quit without saving.

    or:
    esc
    :wq <enter>
    will save then quit


  • Advertisement
  • Closed Accounts Posts: 818 ✭✭✭Cormic


    Really handy vi guide.

    http://www.lagmonster.org/docs/vi.html

    When I started using linux I used nano as it is much easier for the Windows Notepad user :)


  • Closed Accounts Posts: 89 ✭✭ishnid


    8 posts, 6 of which mention vi and no-one's rowed in with a pro-Emacs post yet! Shame on you all ;)


  • Registered Users, Registered Users 2 Posts: 1,421 ✭✭✭Steveire


    I think we need nore nano in this thread actually.

    sudo nano ftw


  • Closed Accounts Posts: 6,151 ✭✭✭Thomas_S_Hunterson


    eh...vi ftw, none of that wussy nano **** ;)
    .
    .
    .
    .
    To the thunderdome!


  • Registered Users, Registered Users 2 Posts: 37,485 ✭✭✭✭Khannie


    vi is great.....when you know how to use it.....before then, it's crap. Nano (IMO) is definitely much more useful to people who are more familiar with windows. The really useful thing about vi is that it's installed on every unix box in the universe.


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 3,886 ✭✭✭cgarvey


    Rollo, have you the oppertunity to be shown how this is done? I.e. a friend who is familiar with SSH/linux sysadmin, or open up VNC over a BB connection for demo?

    EDIT: I'm offering to show you over VNC, if that's any help.

    I'm more concerned at the advice that's being dished out willy nilly to someone who's not au fait with how to login/logout, let alone what shell to use, rather than the vi/emacs debate!!

    .cg


  • Registered Users, Registered Users 2 Posts: 3,514 ✭✭✭Rollo Tamasi


    thanks cg. i need to sort one or two things out first. Khannie gave me some pointers earlier but i have to have root access to the conf folder as i received permission errors while on bin/bash/


Advertisement