SSH 접속 시 Disconnected: No supported authentication methods available (server sent: publickey,gssapi-keyex,gssapi-with-mic)
·
OS/Linux
MobaXterm에서 ssh 접속을 시도했는데 Disconnected: No supported authentication methods available (server sent: publickey,gssapi-keyex,gssapi-with-mic) 이러한 오류가 뜸.. 방법1) ssh 접속시마다 각 터미널프로그램에서 private key (확장자pem,ppk) 파일 지정해서 접속 방법2) 자동로그인 설정 ① sshd_config 파일에서 AuthorizedKeysFile .ssh/authorized_keys 주석처리 vi /etc/ssh/sshd_config ② ~/.ssh/authorized_keys 에서 공개키파일내용 복사-붙여넣기 (.ssh란 디렉토리와 authorized_keys 파일 없으면 생..
[Linux 명령어] JAVA 버전과 위치 확인하기
·
OS/Linux
버전 확인 javac 버전 확인하기 javac -version javac 1.8.0_302​ java 버전 확인하기 java -version openjdk version "1.8.0_302" OpenJDK Runtime Environment (build 1.8.0_302-b08) OpenJDK 64-Bit Server VM (build 25.302-b08, mixed mode)​ 위치 확인 javac 위치 확인하기 which javac /usr/bin/javac​ java 위치 확인하기 which java /usr/bin/java​ javac의 심볼릭 링크 원본 찾기 readlink -f /usr/bin/javac /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.302.b08-0.el..
[Linux] hosts.allow 와 hosts.deny 란?
·
OS/Linux
hosts.allow 와 hosts.deny 이란? - 특정한 클라이언트에게만 서비스를 허용(allow) 또는 차단(deny)하는 역할을 한다. /etc/hosts.allow 서비스 허용 설정 파일 /etc/hosts.deny 서비스 차단 설정 파일 /etc/hosts.deny 파일 편집시 vi /etc/hosts.deny 파일 편집기 열어서 다음과 같이, 제일 하단에 [ALL:ALL] //[접속거부 프로세스: 거부할 IP 주소] 을 추가하여 접속자 전체 차단하면 ssh 로 접속시 연결이 불가능하다. (다른 프로세스 접속시에도 마찬가지다.) /etc/hosts.allow 파일 편집시 vi /etc/hosts.allow 파일 편집기 열어서 다음과 같이, 제일 하단에 [ALL : 허용할 IP주소 : allo..
[Linux] passwd 명령으로 패스워드 변경 안될 시 (chage명령어 이용)
·
OS/Linux
password 기간 만료로 새로 변경해야 되는 경우에 임시로 password를 변경하고, 다시 passwd 명령을 치면 아래와 같은 에러를 볼 수 있다. passwd (current) UNIX password: You must wait longer to change your password passwd: Authentication token manipulation error 위 에러는 chage -d 명령어를 이용해 암호변경일을 reset 하고, 다시 passwd 명령어를 치면 바꿀 수 있다. 왜냐하면, 암호변경일을 reset하면 암호만료일도 reset되서 패스워드를 다시 설정해야하게끔 한 것이기 때문이다. ex) lee 라는 계정에 암호 변경일 reset 하고 싶다면, (root에서 변경해야함) ch..
[Linux] nologin 계정이란? (/etc/passwd에서 로그인 쉘)
·
OS/Linux
"/sbin/nologin"란? 로그인이 안되는 계정을 의미한다. 보통은 일반계정은 생성을 하면 "/bin/sh"이 할당된다. 보안상의 이유로 nologin계정을 이용하는데, 예를 들어서 http 데몬인 apache의 경우 uid가 48로 되어 있다. 이 httpd를 root의 uid로 돌릴 경우 apache의 보안 취약점이 발견되어 apache를 해킹당할 경우 공격자에게 root 계정을 바로 내어주게 된다. 하지만 apache라는 계정으로 돌렸을 때 같은 상황이 발생한다면 비록 공격을 당하더라도 root를 바로 내어주는 것이 아니고 apache라는 user 계정을 내어주게 된다. 공격당한 계정이 root인가 아닌가는 큰 차이점이 있다! 일반적으로 로그인해서 사용하는 일반 사용자 계정을 경우 userad..
[Linux 명령어] Linux에서 OS 버전 확인
·
OS/Linux
- 일반적인 커널에 대한 정보 uname -a - OS버전에 대한 정보 cat /etc/redhat-release - OS버전에 대한 정보 (자세하게) cat /etc/*release* - OS bit 확인 getconf LONG_BIT
[Linux 명령어] useradd 옵션 설명
·
OS/Linux
useradd --help Usage: useradd [options] LOGIN useradd -D useradd -D [options] Options: -b, --base-dir BASE_DIR base directory for the home directory of the new account -c, --comment COMMENT GECOS field of the new account -d, --home-dir HOME_DIR home directory of the new account -D, --defaults print or change default useradd configuration -e, --expiredate EXPIRE_DATE expiration date of the new ac..
CentOS 7.3 - WildFly 24.0.1 설치
·
OS/Linux
1. Java OpenJDK 설치 yum install java-1.8.0-openjdk-devel 2. 사용자 생성 groupadd -r wildfly useradd -r -g wildfly -d /opt/wildfly -s /sbin/nologin wildfly *nologin 계정으로 생성 한 후 확인 grep wildfly /etc/passwd 3. WildFly 설치 wget https://download.jboss.org/wildfly/24.0.1.Final/wildfly-24.0.1.Final.tar.gz #압축풀기 tar xvzf wildfly-24.0.1.Final.tar.gz mv wildfly-24.0.1.Final /opt #링크파일 생성 ln -s /opt/wildfly-24.0...
[Linux 명령어] PS AUX 에서 STAT 필드 의미
·
OS/Linux
ps aux : 프로세스 상태를 보는 용도 ps -ef : 부모 프로세스와 자식 프로세스의 관계를 볼 때 D Uninterruptible sleep (usually IO) R Running or runnable (on run queue) S Interruptible sleep (waiting for an event to complete) T Stopped, either by a job control signal or because it is being traced. W paging (not valid since the 2.6.xx kernel) X dead (should never be seen) Z Defunct ("zombie") process, terminated but not reaped by i..
fstab 자동 마운트 옵션
·
OS/Linux
fstab(File System Table) 각각의 파일 시스템 정보를 담아두는 파일 부팅 시 여기에 적혀있는 모든 파일 시스템을 자동으로 마운트하게 되어 있다. 1. spec : 마운트 할 장치나 원격 파일 시스템 등을 설정 2. file : 파일 시스템을 마운트할 위치를 설정. swap 파티션일 경우는 'none'이라고 적는다. 3. vfstype : 파일 시스템의 타입을 설정 ex) ext2, iso9660, msdos, nfs, autofs 4. mntops : 파일 시스템에 마운트 할 옵션을 설정 (1) defaults : rw, suid, dev, exec, auto, nouser, and async (2) ro : 읽기 전용으로 마운트 (3) rw : 읽고 쓰기로 마운트 (4) noauto ..