Debian / Ubuntu sudo apt-get install -y openssh-server
RPM based Distros, Fedora / CentOS / RedHat sudo dnf install -y openssh-server
or use yum
sudo yum install -y openssh-server
Start ssh service sudo systemctl start sshd
By default the SSH service should start when the system starts, but if not try the following command to enable the service on boot up.
Debian / Ubuntu
systemctl enable ssh
Fedora, CentOS, RedHat
systemctl enable ssh
Change SSH port
Not necessary, but it is a good idea to change the default ssh port. To change the port edit the sshd file.
Posted in CentOS, Command Line, Debian, Fedora, Linux, RedHat, Ubuntu |
Tagged centos, debian, fedora, linux, openssh, redhat, ssh, sshd, ubuntu |
All that needs to be done is the “id_rsa” key needs to be copied to the “new” host. You can do this with SCP or sftp.
Example with SCP
The following examples are showing how to export a RSA private key, if your using DSA, then replace id_rsa with id_dsa.
Copy private key from remote server to local machine for the local user
scp firstname.lastname@example.org:~/.ssh/id_rsa ~/.ssh/
Copy private key from localhost to remote host. This command copies the local users private key to the root user @ 192.168.1.1
scp ~/.ssh/id_rsa email@example.com:~/.ssh/
This is just a quick write on the hosts.allow and deny files. You can lookup “spawn” and/or “twist” for some advanced usage.
So to limit an IP address, or a IP range access to SSH, do the following
Deny all incoming request for SSH
Edit the “hosts.deny” file
add the following line
sshd : ALL
Now edit “hosts.allow” and allow the client IP, or IP range to access SSH
add the following line to allow a single IP
sshd : 192.168.1.182
If you want to allow the whole subnet, then replace the above line with this one
sshd : 192.168.1.
hosts.allow overrides hosts.deny. So you deny everything and then allow exceptions.
Problem: Volume goes from mute to 100% with very little ability to adjust it.
The following command should work on any Linux computer that is running alsa.
yum install mariadb mariadb-server freeradius-mysql
Setup MySQL database.
mysql -u root -p
CREATE DATABASE radius;
GRANT ALL ON radius.* TO radius@localhost IDENTIFIED BY "RadiusPassword";
Import the schema.sql file into the db.
mysql -u radius -p radius < /etc/raddb/mods-config/sql/main/mysql/schema.sql
Should be good to go.
It looks like MariaDB replaces MySQL on CentOS 7 and Fedora so to install the Server and client install the following two packages.
yum install mariadb mariadb-server
or for Fedora
dnf install mariadb mariadb-server
Install kernel headers, dkms, etc
dnf -y kernel-headers kernel-devel dkms gcc gcc-c++
Reboot the VM
Mount the Guest Additions by going to menu > Devices > Insert Guest Additions CD image… or you can hit “Host + D”.
The Host key is typically the Right Ctrl(On Windows) or CMD(On OS X) key.
Installing the Guest Additions
Via the GUI
Mount the Guest Additions from your file browser, and then launch the “VBoxLinuxAdditions.run”.
You will need root privileges, so either launch your file browser as root, or drag and drop the “VBoxLinuxAdditions.run”, into a root terminal and hit Enter.
Via Command Line mkdir /tmp/vbox
sudo mount /dev/cdrom /tmp/vbox
If you run into any errors, try ejecting, and remounting the Guest Additions cd.
Run the following commands as root
rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm
rpm -Uvh http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm
Update the system and then download the driver.
yum install kmod-wl
When the above commands finish reboot the computer
Debian Based Distros
The below command should work for Debain, Ubuntu, and the Raspberry Pi Raspbian.
RPM Based Distros
The following works on Fedora, CentOS, ReHat.
The above commands return all of the packages installed on a system. If you want to look for a specific program or package you can use grep to filter the results.
rpm -qa | grep program
dpkg --get-selections | grep program
Open up the following file with your favorite text editor. Change eth0 to the interface you need, like “wlan0” or “eth1”.
The file should look something like the following.
To set the static IP address change “BOOTPROTO=dhcp” to “BOOTPROTO=static” and add the following to the end of the file. If you want/need the interface to come up when the computer boots up then be sure to change “ONBOOT=no” to “ONBOOT=yes”.
So your file should now look like this.
Save the file and restart networking.
service network restart
Finally, check you IP address with ifconfig.
root@localhost ~]# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 0A:2G:F3:56:66:4B
inet addr:192.168.1.110 Bcast:192.168.1.255 Mask:255.255.255.0
Posted in CentOS, Command Line, Fedora, Linux, Networking, RedHat |
Tagged centos, fedora, ip address, networking, red hat, Static ip |