Home / Articles / BSD / FreeBSD / Initial FreeBSD configuration: configuring SSH and installing mc

Initial FreeBSD configuration: configuring SSH and installing mc

Initial FreeBSD configuration: configuring SSH and installing mc
 
Initial FreeBSD configuration: configuring SSH and installing mc
  • Currently 0 out of 5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Rating: 0/5 (0 votes cast)

Thank you for rating!

You have already rated this page, you can only rate it once!

Your rating has been changed, thanks for rating!

Log in or create a user account to rate this page.


This article describes the initial steps of how to configure FreeBSD by configuring ssh and installing Midnight Commander for comfortable work.

All the steps below should be done under superuser (root). Before you start, check your Internet connection.

Midnight Commander installation

Midnight Commander is a file manager, analog of Norton Commander for Windows. It will help you to quickly edit configuration files with user-friendly editor. To install mc, run the following commands:

cd/usr/ports/misc/mc
make install clean

Also run the command below to make mc available in the command line right after installation:

rehash

Now mc is availiable.

SSH server configuration

Next step is to configure SSH server to work with FreeBSD through network (remote access). For this we need to open file /etc/ssh/sshd_config by mc (press F4 to edit file) and change the following options:

Port 22
Protocol 2
LoginGraceTime 60
PermitRootLogin no
PasswordsAunthentication yes
PermitEmptyPasswords no
UseDNS no

These are minimal options to run SSH server.

The next step is to start SSH server automatically at boot time. Add the following lines to /etc/rc.conf file:

sshd_enable="YES"

Now start SSH server:

/etc/rc.d/sshd start

Authorize yourself in the system using your login and password.

ssh frank@192.168.1.1

Where:

  • frank is login name of your user in the system;
  • 192.168.1.1 is your server IP address in FreeBSD.

But, if you use Windows you will need to install additional application named Putty in order to connect to your FreeBSD server by SSH.

If you need to have a remote access as superuser you will need to add your current user (frank in this example) to the group wheel by the following command:

pw groupmod wheel -m frank

If you have logged in as user frank in SSH, the next command will make you superuser:

su

Finally the system will ask you the password for superuser (root).


 

Read also

Install MySQL server on FreeBSD

Install MySQL server on FreeBSD

Install Apache in FreeBSD

Install Apache in FreeBSD

Log in or create a user account to post a comment.

easyos.net
117217982212577402640

Quick navigation

General navigation