LINUX.ORG.RU

Сообщения coreglot

 

Не запусается srvise

Форум — Admin

Всем привет. Есть небольшая программа на питоне. Прописал для нее сервис

[Unit]
Description=Test
After=network.target multi-user.target local-fs.target
Requires=mysql.service

[Service]
Type=simple
ExecStart=/usr/bin/python3 /mnt/server_files_sys/ws_server/test/main.py
StandardInput=tty-force

[Install]
WantedBy=multi-user.target

Почему то после перезагрузки сервис не стартует автоматически

Если вызвать status то получаю следующее

● test - Test
     Loaded: loaded (/lib/systemd/system/test.service; enabled; vendor preset: enabled)
     Active: inactive (dead) since Fri 2020-08-21 17:26:45 UTC; 10min ago
    Process: 1060 ExecStart=/usr/bin/python3 /mnt/server_files_sys/ws_server/test/main.py (code=killed, signal=HUP)
   Main PID: 1060 (code=killed, signal=HUP)

Aug 21 17:26:45 pc systemd[1]: Started Test.
Aug 21 17:26:45 pc systemd[1]: test.service: Succeeded.

Если прописать запуск сервиса в ручную то все ок

● test.service - Test
     Loaded: loaded (/lib/systemd/system/test.service; enabled; vendor preset: enabled)
     Active: active (running) since Fri 2020-08-21 17:39:50 UTC; 2s ago
   Main PID: 1391 (python3)
      Tasks: 1 (limit: 6946)
     Memory: 11.1M
     CGroup: /system.slice/test.service
             └─1391 /usr/bin/python3 /mnt/server_files_sys/ws_server/test/main.py

Aug 21 17:39:50 pc systemd[1]: Started Test

Помогите пожалуйста понять в чем может быть дело? Спасибо

 ,

coreglot
()

Не получается настроить ssh PuTTY

Форум — Admin

Здравствуйте. Помогите пожалуйста настроить ssh

Что и как я делал

1) открыл PuTTYgen и создал ключ https://ibb.co/TrSpB0j https://ibb.co/gvLL15s

2) сохранил все созданные ключи https://ibb.co/L80y1sS

2) в PuTTY указал путь к созданному приватному ключу и прописал настройки сервера https://ibb.co/7QS30vy https://ibb.co/wcyQJXh

3) публичный ключ загрузил на сервер в соответствии с файлом конфигурации https://ibb.co/LPnNm0d

#	$OpenBSD: sshd_config,v 1.103 2018/04/09 20:41:22 tj Exp $

# This is the sshd server system-wide configuration file.  See
# sshd_config(5) for more information.

# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin

# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented.  Uncommented options override the
# default value.

Include /etc/ssh/sshd_config.d/*.conf

Port 1002
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::

#HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_ecdsa_key
#HostKey /etc/ssh/ssh_host_ed25519_key

# Ciphers and keying
#RekeyLimit default none

# Logging
#SyslogFacility AUTH
#LogLevel INFO

# Authentication:

#LoginGraceTime 2m
#PermitRootLogin prohibit-password
#StrictModes yes
#MaxAuthTries 6
#MaxSessions 10

PubkeyAuthentication yes

# Expect .ssh/authorized_keys2 to be disregarded by default in future. 
AuthorizedKeysFile	.ssh/authorized_keys

#AuthorizedPrincipalsFile none

#AuthorizedKeysCommand none
#AuthorizedKeysCommandUser nobody

# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes

# To disable tunneled clear text passwords, change to no here!
PasswordAuthentication no
#PermitEmptyPasswords no

# Change to yes to enable challenge-response passwords (beware issues with
# some PAM modules and threads)
ChallengeResponseAuthentication no
Protocol 2
# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#KerberosGetAFSToken no

# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes
#GSSAPIStrictAcceptorCheck yes
#GSSAPIKeyExchange no

# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication and
# PasswordAuthentication.  Depending on your PAM configuration,
# PAM authentication via ChallengeResponseAuthentication may bypass
# the setting of "PermitRootLogin without-password".
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and ChallengeResponseAuthentication to 'no'.
UsePAM yes

#AllowAgentForwarding yes
#AllowTcpForwarding yes
#GatewayPorts no
X11Forwarding yes
#X11DisplayOffset 10
#X11UseLocalhost yes
#PermitTTY yes
PrintMotd no
#PrintLastLog yes
#TCPKeepAlive yes
#PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0
#ClientAliveCountMax 3
#UseDNS no
#PidFile /var/run/sshd.pid
#MaxStartups 10:30:100
#PermitTunnel no
#ChrootDirectory none
#VersionAddendum none

# no default banner path
#Banner none

# Allow client to pass locale environment variables
AcceptEnv LANG LC_*

# override default of no subsystems
Subsystem	sftp	/usr/lib/openssh/sftp-server

# Example of overriding settings on a per-user basis
#Match User anoncvs
#	X11Forwarding no
#	AllowTcpForwarding no
#	PermitTTY no
#	ForceCommand cvs server

4) указал права доступа к папке

sudo chmod -R 777 /mnt/server 

5) В итоге получаю такую вот ошибку https://ibb.co/ZmrgP6N https://ibb.co/fMfdDZz

 ,

coreglot
()

RSS подписка на новые темы