define ssh config file in centos 6.9 after delete - ssh-config

I am working with centos 6.9 . I unconsciously deleted the ssh_config file which is located in /etc/ssh.
Any idea please to restore it , or to rewrite it?
Thanks a lot

Related

dnf cache sync with local repo

I setup dnf-automatic on RHEL 8.6 and set the apply_updates=no in the /etc/dnf/automatic.conf config file. I can see the packages are being stored in cache /var/dnf/cache. I have a local repo and I want to copy these packages into local repo and then rebuild the repodata. What is the best way to go about doing this? Any ideas are appreciated. Thanks.

issue with condifr: puppet poiting to wong confdir

I am using puppet6 on centos 7.4.
$ puppet config pring confdir
is pointing to incorrect folder. I tried setting it to right folder but
set command does not have any effect. any clue what is happening?

Automate installation of CentOS 6.4 -minimal with kickstart on a DVD

I am trying to automate installation of CentOS 6.4 -minimal with kickstart on a DVD
Below is my kick start that was auto generated by anaconda
# Kickstart file automatically generated by anaconda.
#version=DEVEL
install
cdrom
lang en_US.UTF-8
keyboard us
network --onboot no --device eth0 --bootproto dhcp --noipv6
rootpw --iscrypted $6$.tHtXJMs5GEzyQRm$52EX5ue3UuFC/zgencUbxuvwHXIPDuLmllkuNs4NRq7/Wa7FsI8ICxwPDsy/KnzSaUfEqfBROLAv0tPMksOhA1
firewall --service=ssh
authconfig --enableshadow --passalgo=sha512
selinux --enforcing
timezone --utc America/New_York
bootloader --location=mbr --driveorder=sda --append="crashkernel=auto rhgb quiet"
repo --name="CentOS" --baseurl=cdrom:sr0 --cost=100
%packages --nobase
#core
%end
============================================================
The problem happens when the ks.cfg tries to install packages from Repo that is in DVD
The error I'm getting:
Unable to read package metadata. This may be due to a missing repodata directory. Please ensure that your install tree has been correctly generated.
cannot find a valid baseurl for repo:CentOS
============================================================
If this a bug, is there any other way to automate the installation ?
Is there any alternate solution to Automate the CentOS6.4 minimal?
I have tried removing the line
repo --name="CentOS" --baseurl=cdrom:sr0 --cost=100
Problem still persists
Then I tried changing to something like this
repo --name="CentOS" --baseurl=file:///mnt/source--cost=100
Problem still persists
What am i missing to include .... ???
I've faced the same problem today, but after commenting the line it worked :)
#repo --name="CentOS" --baseurl=cdrom:sr1 --cost=100
Why don't you use system-config-kickstart gui tool for creating your own file and then use mkisofs to create your own iso too.
http://www.centos.org/docs/4/html/rhel-sag-en-4/ch-redhat-config-kickstart.html
The above link would be helpful.
Thanks & Regards,
Alok Thaker
From the RHEL 7 Kickstart documentation:
url Install from an installation tree on a remote server via FTP, HTTP, or HTTPS.
--url= - The location to install from. Supported protocols are HTTP, HTTPS, FTP, and file.
--mirrorlist= - The mirror URL to install from.
--proxy= - Specify an HTTP, HTTPS or FTP proxy to use while performing the installation.
--noverifyssl - Disable SSL verification when connecting to an HTTPS server.
You have to set url property, like:
url --url=http://mirror.centos.org/centos/7.0.1406/os/x86_64/
There are a handful of Packer templates that leverages kickstart scripts to create Centos VMs. One of those is the Bento Project.
You did not have a space between the second and third parameter:
repo --name="CentOS" --baseurl=file:///mnt/source/--cost=100
Correct:
repo --name="CentOS" --baseurl=file:///mnt/source/ --cost=100

rpmbuild differences in RHEL 5.7 and RHEL 6.1

I'm trying to build an RPM using rpmbuild, which would work for both RHEL 5.7 machines and RHEL 6.1 machines, and I'm having some trouble understanding how to structure my rpmbuild/SOURCE directory.
According to what I understood, if my package name is XXX, than I need to prepare rpmbuild/SOURCE/XXX.tar.gz, a tarball which contains:
1. A directory named XXX;
2. In it, all the directories and files I'm installing should be ordered as if their paths are relative to the root directory (i.e. /)
For instance, if I want to install a file called foo.sh to /tmp/XXXdir/, I need to have rpmbuild/SOURCE/XXX.tar.gz contain XXX/tpm/xxxdir/foo.sh
This is what I understood and this is what works when I install my RPM on my RHEL 5.7 machine (i.e. in the example above the file is installaed to /tmp/XXXdir/foo.sh).
However, on an RHEL 6.1 machine I get the undesired behaviour of having my files installed to a newly created /XXX directory, and from there I get the same tree structure I wanted for / (i.e. in the example above I get the file at /XXX/tmp/XXXdir/foo.sh).
Any idea why this happenes? Perhaps I've got it wrong and my rpmbuild/SOURCE structure is not as it should be? Any insights would be very helpful.
Thanks a lot in advance,
Lior

update Apache Ant on CentOS

I need to update Apache Ant on my server.
I downloaded the newest Ant, built it, and (I thought) installed it. But when when I check it says the old version is still installed.
How do I update/replace the previous version of Apache Ant on a CentOS 5.? server?
take care,
lee
As mentioned it's probably getting picked up in your path. Post the output from echo $PATH
To configure your CentOS after installing a new version of Apache Ant, proceed to the following steps:
Locate the directory where the new Ant is located
Set the ANT_HOME environment variable to this directory
Add $ANT_HOME/bin to your PATH
P.S. To modify environment variables, you may edit the /etc/environment file, and reboot, or modify your local .bashrc. Look at your current environment variables by analyzing the output of printenv, e.g., to see the current value of PATH and then add the Ant path to it, e.g.
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/lib/jvm/adoptopenjdk-8-hotspot-amd64/bin:/usr/local/ant/bin

Resources