<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    Chan Chen Coding...

    set up ssh server on ubuntu server 12.04 edition

    SSH stands for “secure shell”, and it is a network protocol that allows you to securely send commands to a remote machine. The “secure” part comes from the fact that the connection is encrypted, which means that an attacker cannot eavesdrop on the connection, or intercept and replace your commands with his own midway through transit. SSH is pretty reliable and secure, and is commonly used in the Linux world. Administrators often use it to remotely manage machines – it’s usually more comfortable to control a server from your laptop than in the chilly and noisy server room.

    In this post, we’ll show you how to set up an SSH server on Ubuntu 12.04 Precise Pangolin.

    The default SSH server package for Ubuntu 12.04 Precise Pangolin is OpenSSH Server, which we’ll use here.

    First, you’ll need to install OpenSSH Server. To do so, open up a Terminal window and type the following command:

    sudo apt-get install openssh-server

    Enter your password to authenticate, and the apt utility will download and install OpenSSH Server for you. Depending on the speed of your Internet connection and your computer, the installation may take several minutes.

    Once the installation has finished, return to the Terminal window. We’ll need to make a few changes to your /etc/ssh/sshd_config file in order to increase SSH’s security. First, as always, we’ll want to make a backup copy of your sshd_config file in case anything goes wrong. Type this command into the Terminal:

    sudo cp /etc/ssh/sshd_config ~

    This will make a backup copy of the sshd_config file in your home directory.

    Next, we’ll need to edit the sshd_config file itself.

    sudo vi /etc/ssh/sshd_config

    (Note that you can use emacs or gedit or another text editor of your choice.)

    Like almost every other server software package, SSH is controlled by a number of directives in its configuration file. The default installation of OpenSSH server is reasonably secure. However, you might want to make a few changes to tighten up its security to additional degree.

    The “PermitRootLogin” directive is one you’ll want to change. Once you’re editing the /etc/ssh/sshd_config file, you’ll want to change the following directive as follows:

    PermitRootLogin no

    This will keep anyone from attempting to log into your server via SSH as root. It’s generally a good idea not to allow any to log into your SSH server as root. If an attacker manages to hack into your SSH server with the root login, he will have complete control over your machine, and that is definitely not a good thing.

    Another directive you might want to change is the “AllowUsers.” When the AllowUsers directive is active, only users specifically specified in the directive can access the system through SSH. This adds an additional layer of protection to your SSH server by only allowing specific users to connect via SSH. For instance, if you wanted to limit SSH access to just the “camalas” user account, edit the AllowUsers directive like this:

    AllowUsers camalas

    To add multiple users to the AllowUsers directive, just add them one by one without commas or semicolons. An AllowUsers directive that permits the camalas user account and the lmaraeus user account to log in would look like this:

    AllowUsers camalas lmaraeus

    You may also want to consider changing the Port directive. By default SSH runs over TCP/IP port 22, which means that any malware bot autoscanning port 22 can target it. If you set up your user accounts with a weak password (always a bad idea), eventually an automated bot might break through and guess the password. Changing the Port directive to something different will make SSH run over a different port, blocking some of those automated cracking attempts. To set SSH to run over port 5699 instead, make sure your Port directive looks like this:

    Port 5699

    Note that if you change your SSH server’s default port, you’ll need to remember the new port number when using an SSH client, which we’ll cover in the next section.

    After you’ve finished changing the directives in /etc/ssh/sshd_config, switch vi to command mode, and save and quit vi. After you return to the command line, restart the SSH daemon with this command:

    sudo restart ssh

    You should now be able to SSH into your Ubuntu 12.04 Precise Pangolin machine from another system with an SSH client.



    -----------------------------------------------------
    Silence, the way to avoid many problems;
    Smile, the way to solve many problems;

    posted on 2013-02-24 01:18 Chan Chen 閱讀(522) 評論(0)  編輯  收藏 所屬分類: Linux

    主站蜘蛛池模板: 最近中文字幕免费大全| 亚洲一区二区三区高清不卡| 免费国产成人午夜在线观看| 亚洲国产精品综合久久20| 亚洲精品无码成人片在线观看| 亚洲视频在线免费播放| 日韩精品视频在线观看免费| 亚洲日韩乱码中文无码蜜桃 | 99人中文字幕亚洲区| 无遮免费网站在线入口| 亚洲色大成网站www| 久久久久亚洲av无码专区导航| 亚洲?V无码成人精品区日韩| 在线不卡免费视频| 免费精品99久久国产综合精品| jzzijzzij在线观看亚洲熟妇| 亚洲精品国产福利片| 亚洲第一极品精品无码久久| 亚洲日韩欧洲乱码AV夜夜摸| 亚洲高清偷拍一区二区三区| 人人狠狠综合久久亚洲高清| 手机看片久久国产免费| 免费女人18毛片a级毛片视频| 国产极品美女高潮抽搐免费网站| 青青青国产在线观看免费网站 | 一本色道久久综合亚洲精品蜜桃冫 | 日本无吗免费一二区| 午夜成人免费视频| 成年男女男精品免费视频网站| 最近国语视频在线观看免费播放| 精品免费久久久久国产一区| 久久精品无码精品免费专区| 91在线视频免费91| 免费国产成人高清视频网站| 中文字幕亚洲一区二区三区| 国产V亚洲V天堂A无码| 国产亚洲精品影视在线| 一个人看的www在线免费视频| 久久国产精品一区免费下载| 丁香花免费高清视频完整版| 免费**毛片在线播放直播|