본문 바로가기

Server/Linux19

[Linux] Rocky9 계정 잠김 확인 및 해제 [root@blog ~]# tail -f /var/log/secureFeb 6 11:39:04 blog sshd[1472177]: error: PAM: Authentication failure for test1 from 1x.xxx.x.xFeb 6 11:39:04 blog sshd[1472177]: error: PAM: Authentication failure for test1 from 1x.xxx.x.xFeb 6 11:39:04 blog sshd[1472177]: Connection closed by authenticating user test1 1x.xxx.x.x port 53328 [preauth]Feb 6 11:39:04 blog sshd[1472177]: Connection closed .. 2026. 2. 6.
[linux] hostname 변경 내용 변경 hagorud99-252329 -- > Rhymix[root@hagorud99-252329 ~]# vi /etc/hostname변경사항 적용[root@hagorud99-252329 ~]# hostname -F /etc/hostname 리부팅하거나 재접속 하면 변경되지만 접속한 쉘에서 바로 변경하고싶다면[root@hagorud99-252329 ~]# exec bash[root@Rhymix ~]#짜잔 2024. 6. 21.
[linux]sshd 실행 불가 Failed to start OpenSSH server daemon Unable to load host key:.. 서버 ssh 원격 접속이 되지 않고 로컬 확인 시 ssh 제몬 실행이 되지않아 /var/log/message 로그 확인 시 아래처럼 에러가 발생하고 있었다. Unable to load host key: /etc/ssh/ssh_host_rsa_keyUnable to load host key: /etc/ssh/ssh_host_ecdsa_keyUnable to load host key: /etc/ssh/ssh_host_ed25519_key.....Faild to start OpenSSH server daemon.  방법# ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key 엔터엔터엔터--> 키값생성# ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_.. 2024. 6. 19.
[ssh google authenticator] Ubuntu ssh 접속 OTP 2차인증 설정 서버 보안을 위해 ssh 접속 시 google OTP를 활용하여 2차 인증을 하도록 설정 진행 난이도 : 하 설정 소요 시간 : 10분~20분 테스트 버전 : 16.04, 18.04, 20.04, 22.04 모두 동일한 방법으로 진행하였으며 정상적으로 적용된 점 확인하였다. 1.OTP 설치 진행 # apt install -y libpam-google-authenticator root@hagorud99-228099:~# apt install -y libpam-google-authenticator Reading package lists... Done Building dependency tree Reading state information... Done The following packages were au.. 2023. 11. 16.
[ssh google authenticator] Rocky8 ssh 접속 OTP 2차인증 설정 서버 보안을 위해 ssh 접속 시 google OTP를 활용하여 2차 인증을 하도록 설정 진행 난이도 : 하 설정 소요 시간 : 10분~20분 # dnf install epel-release # dnf install google-authenticator qrencode qrencode-libs -y // 구글 오티피 설치 1.OTP 설치 진행 # dnf install epel-release 마지막 메타자료 만료확인(0:13:08 이전): 2023년 11월 13일 (월) 오전 11시 27분 43초. 종속성이 해결되었습니다. ================================================================================ 꾸러미 구조 버전 저장소 크기 =====.. 2023. 11. 16.
rvm ruby install error ERROR: Loading command: install (LoadError) cannot load such file -- opensslERROR: While executing gem ... (NoMethodError) undefined method `invoke_with_build_args' for nil:NilClass ...등 openssl 어쩌구 에러 rvm으로 ruby install 시 정상적으로 설치가 안됨. # rvm install ruby-2.7 Searching for binary rubies, this might take some time. Found remote file https://rubies.travis-ci.org/ubuntu/22.04/x86_64/ruby-2.7.8.tar.bz2 Checking requirements for ubuntu. Installing requirements for ubuntu. Updating system.. Installing required packages: bison, libgdbm-dev, libncurses5-dev, libsqlite3-dev, libyaml-dev, sqlite3, libgm.. 2023. 7. 26.
gpg 에러 gpg: keyserver receive failed: Server indicated a failure redmine 설치 중 ruby 설치가 필요하여 gpg 설정을 하는 도중.....아래 명령어를 사용했지만 계속 gpg: keyserver receive failed: Server indicated a failure 에러가 발생하는 상황이였다. 메뉴얼에 나와있는 명렁어 gpg --keyserver hkp://pool.sks-keyservers.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB 구글링하여..이것저것 쳐봤지만.... 계속 오류발생.. 에러나는 명령어... gpg --verbose --keyserver hkp://pool.sks-keyservers.net --recv-ke.. 2023. 7. 25.
Linux 설정파일 확인 시 주석처리 제외하여 출력 Linux 터미널 창에서 설정파일 확인 시 주석처리가 되어 있는 부분 ($or#) 제외하여 현재 적용되고 있는 구문들만 출력하여 확인 하고 싶을때 아래 명령어를 사용한다. # egrep -v "^#|^$" [파일 이름] 2023. 5. 2.
Linux 환경 설정 및 함수, alias설정 파일들 비교 /etc/profile, /etc/bashrc ~/.bashrc, ~/.profile , ~/.bash_profile가 있다. 해당 파일들에 대한 간단한 내용과 이에대한 순서도 확인해보자. 1./etc/profile, /etc/bashrc (/etc : 모든 유저에 대한 설정 값 파일이라고 보면된다.) /etc/profile파일에 앞부분이다. 즉 리눅스에서 초기에 파일에 사용방법이나 알아야될 내용을 적어둔 부분. 대충 내용을 보면 로그인 시 시스템 전반적인 환경, 시작프로그램을 셋팅할 수 있는 파일. 함수나 alias부분은 /etc/bashrc 가서 설정하라고 한다. 밑에 내용은 왠만하면 여기에다가 설정하지말고 따로 파일을 만들거나 다른곳에서 설정하라는 소리같다. /etc/profile : 시스템 전역 .. 2022. 1. 15.