Results 1 to 13 of 13
  1. #1

    Newbie help VPS setup question

    Hi,

    I have recently bought a VPS running centOS 6 and I followed the VPS how to guide on this forum, which I just noticed is pretty old but anyway...

    So I have a few questions that I would like to gain a bit of insight about due to my inexperience and this is my first time setting up a VPS.

    In advanced, thank you for your patience

    /etc/hosts
    There is seems to be other domains under the localhost ip such as, autoreply.domain.com and even my zpanel subdomain address.
    I'm not entirely sure if it should be there but since it has been added automatically I guess it is okay for it to be there?

    /etc/ssh/sshd_config
    is the listenAddress the IP of the PC I want to allow access to login through ssh?
    It states to use one that has been assigned to the server, but I haven't assigned one and unsure as to where I do this.

  2. #2
    Join Date
    Dec 2007
    Location
    LocalHost
    Posts
    1,303
    Are you facing any issue with the VPS?? Why you want to change default settings??
    YagHost - Pure SSD Hosting | Since 2007 | Average Response Time: 15 min
    Web Hosting | Reseller Hosting | Managed VPS Hosting
    99.9% Server Uptime Guarantee | 24/7 Rapid Response Tech Support | 30 Day Money Back Guarantee
    LopHost.com - Web Hosting Tutorials

  3. #3
    /etc/hosts
    There is seems to be other domains under the localhost ip such as, autoreply.domain.com and even my zpanel subdomain address.
    I'm not entirely sure if it should be there but since it has been added automatically I guess it is okay for it to be there?
    Yes it is okay, it's default.

  4. #4
    Quote Originally Posted by ravi_9793 View Post
    Are you facing any issue with the VPS?? Why you want to change default settings??
    No I haven't any problems I was just confused, also since I got my provider to change my hostname it didn't seem to update the hosts file and so I made changes to match this.

  5. #5
    I'm currently setting up RSA-keys for ssh login and I'm getting this error:
    Disconnted: No supported authentication methods available (server sent:publickey,gssapi-keyex,gssapi-with-mic)
    I have copied over the public key in to the ~/.shh/authorized_keys file and updated the necessary params in the sshd_config file.
    I also selected my private key in putty, so Im unsure, currently been googling for a about an hour but if anyone knows please enlighten me

  6. #6
    Join Date
    Dec 2011
    Location
    Montreal
    Posts
    334
    Quote Originally Posted by Samuroid View Post
    I have copied over the public key in to the ~/.shh/authorized_keys
    1. Is this a typo mistake or you have a wrong directory?
    2. Are the system permissions ok ?
    Code:
    chmod 700 ~/.ssh
    chmod 600 ~/.ssh/*
    3. Try to run from command line:
    Code:
    restorecon -R -v /root/.ssh
    4. Try to connect via ssh with -v parameter (verbose) to see more info.


    Regards
    ROWEBCA
    Server Services

  7. #7
    1.
    Yes that was a typo on the forum, it is spelt correctly.

    2.
    Permission's are set up right

    I managed to login with to root user however I created a new users and the I got the message "Server refund our key".

  8. #8
    Join Date
    Dec 2011
    Location
    Montreal
    Posts
    334
    Quote Originally Posted by Samuroid View Post
    1.
    Yes that was a typo on the forum, it is spelt correctly.

    2.
    Permission's are set up right

    I managed to login with to root user however I created a new users and the I got the message "Server refund our key".

    Like I told you please run

    Code:
    restorecon -R -v /home/username/.ssh
    and try again. Is SELinux disabled? If yes ignore my post.

    Regards
    ROWEBCA
    Server Services

  9. #9
    One problem I found was that I was putting the .ssh authorized_keys file in the root directory rather than my home username directory.
    I tried your suggestion also but no luck, I'm going to try recreating the relevant keys and files for the right user and see if that works

  10. #10
    also, whats the difference between:
    /etc/init.d/sshd restart
    and
    /etc/rc.d/init.d/sshd restart
    the file sshd_config, should I be setting the AuthorizedKeysFile to /home/user/.ssh/authorized_keys ?

  11. #11
    I moved the location of the authorized_keys file from the user's home directory to a directory under /etc/ as it will always be accessible and this did the job

  12. #12
    I installed iptables and also fail2ban, after adding some iptables rules rechecked it and found
    Chain fail2ban-SSH (1 references)
    target prot opt source destination
    REJECT all -- vps.adomain.com anywhere reject-with icmp-port-unreachable
    Does fail2ban automatically add reject rules in iptables if it thinks an ip is a threat?

    I noticed that it has the same secondary IP as me?! I used network-tools to check the domains dns records

  13. #13
    Quote Originally Posted by Samuroid View Post
    I installed iptables and also fail2ban, after adding some iptables rules rechecked it and found


    Does fail2ban automatically add reject rules in iptables if it thinks an ip is a threat?

    I noticed that it has the same secondary IP as me?! I used network-tools to check the domains dns records
    Yes that's the point of fail2ban. Try doing "iptables -L -n" to see the IP instead of the reverse DNS.
    WonderProxy can help your team do localization testing from around the globe. With more than 200 locations there's no excuse for not testing your website.
    The Where's It Up? API can help multiply your monitoring infrastructure. You can request pings, traceroutes, DNS checks, and HTTP checks from all across the WonderProxy network.

Similar Threads

  1. VPS and DNS Setup - Newbie question
    By ash2dust in forum VPS Hosting
    Replies: 7
    Last Post: 03-27-2011, 02:51 AM
  2. Newbie VPS Question(s)
    By edka in forum VPS Hosting
    Replies: 5
    Last Post: 12-06-2009, 02:59 AM
  3. Domain newbie setup question
    By webstyler in forum Web Hosting
    Replies: 15
    Last Post: 11-17-2005, 09:47 AM
  4. Newbie NiXT setup question
    By bedlam in forum Hosting Software and Control Panels
    Replies: 0
    Last Post: 04-04-2003, 04:30 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •