SageIN :: 천천히 걷기
본문 바로가기
반응형

전체 글367

전국 비건 채식 까페 리스트 네이버 지역 API 기반 데이터로 만들어진 지도입니다. 방문전 검색 혹은 전화번호로 확인 하시길 바랍니다. 구글 내지도 어플 저장해서 보시면 더 편합니다. https://play.google.com/store/apps/details?id=com.google.android.apps.m4b 2019. 11. 20.
라즈베리파이 보안강화 fail2ban 설치하기 brute-force 공격으로 부터 대비하기위해 fail2ban 설치합니다. 1. fail2ban 설치 sudo apt install fail2ban 2. 설정파일 복사 및 수정 sudo cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local sudo nano /etc/fail2ban/jail.local 3. 파일수정 [sshd] enabled = true port = ssh logpath = %(sshd_log)s backend = %(sshd_backend)s maxretry = 3 bantime = -1 5. 서비스 재시작 sudo service fail2ban restart 4. 로그확인 sudo tail -10 /var/log/fail2ban.log 5. b.. 2019. 11. 14.
라즈베리파이 SSH 포트변경하기 1. sshd_config 파일 수정 sudo nano /etc/ssh/sshd_config #Port 22 -> 주석풀고 원하는 포트번호로 수정 2. services 파일수정 sudo nano /etc/services 22/tcp - > 원하는 포트번호로 수정 2019. 11. 14.
라즈베리파이 자동으로 ssh-server 를 업데이트 1. crontab 주기적으로 스크립트를 통해 업데이트 $ crontab -e 매일 자정 업데이트를 확인 및 진행하고 싶다면 파일 하단에 아래문구 삽입 0 0 * * * apt install openssh-server 2. 내용확인 $ crontab -l 2019. 11. 14.
라즈베리파이 파이썬 PIP 설치하기 파이썬 패키지를 설치 관리해주는 PIP를 설치 1. pip은 Python 2.x용, pip3는 Python 3.x apt-get install python-pip pi@raspberrypi:/home $ sudo apt-get install python3-pip 2. 버전 확인 pi@raspberrypi:/home $ sudo pip --version pi@raspberrypi:/home $ sudo pip3 --version 2019. 11. 13.
라즈베리파이 FTP 설정하기 1. vsftpd 설치하기 sudo apt-get install vsftpd 2. FTP 설정파일 수정하기 찾아 주석(#) 제거하기 더보기 anonymous_enable=NO local_enable=YES write_enable=YES local_umask=022 chroot_local_user=YES chroot_list_enable=YES chroot_list_file=/etc/vsftpd.chroot_list 3. FTP 사용자리스트에 사용자 추가 pi@raspberrypi:~ $ sudo nano /etc/vsftpd.chroot_list 4. FTP 재시작 pi@raspberrypi:~ $ sudo service vsftpd restart 5. 데비안 OS 시작프로그램 등록 pi@raspberr.. 2019. 11. 13.
라즈베리파이(Raspbian) 고정 IP 설정 및 초기설정 1. 라즈베리파이 OS 다운로드 https://www.raspberrypi.org/downloads/ Raspberry Pi Downloads - Software for the Raspberry Pi Download free software for the Raspberry Pi, including NOOBS, Raspbian, and third-party operating system images. Beginners should start with NOOBS. www.raspberrypi.org 2. USB에 이미지 쓰기 위해 Win32 Disk Imager https://sourceforge.net/projects/win32diskimager/ Win32 Disk Imager Download Win32.. 2019. 11. 13.
파이썬으로 이메일 보내기 from email.message import EmailMessage import smtplib def emailSend(contentText,toEmail,subject): smtp_gmail = smtplib.SMTP('smtp.gmail.com', 587) # 서버 연결을 설정하는 단계 smtp_gmail.ehlo() # 연결을 암호화 smtp_gmail.starttls() # 로그인 smtp_gmail.login('메일주소@gmail.com', '암호') msg = EmailMessage() # 제목 입력 msg['Subject'] = subject # 내용 입력 msg.set_content(contentText) # 보내는 사람 msg['From'] = '받는사람메일주소' # 받는 사람 msg[.. 2019. 10. 31.
반응형

TOP

Designed by 티스토리