最新記事

SSHサーバーは同じクライアントからの複数の接続を拒否します。
linux
ssh
x11
docker
alpine-linux

SSHサーバーは同じクライアントからの複数の接続を拒否します。

Alpine Linux 3.15 Dockerコンテナで実行される単純なopensshサーバーがあり、dwmを使用してXサーバーを実行しているSSHサーバーと同じバージョンのAlpineを実行する他のコンテナもあります。 次のコマンドを使用して、stXサーバーからSSHサーバーに接続して実行しました。 ssh -v -t [email protected] st SSH サーバーは、次のコマンドを使用して実行されます。 /usr/bin/sshd -D -d -e 変数は(SSHサーバーのホスト名として)$DISPLAYに設定されます。ssh:10ssh クライアントは、stサーバーからクライアントディスプレイ()へのX11転送を介してグラフィカルアプリケーションを開くことができます。問題は、インスタンスを1つだけ開くことができ、st次のエラーを受け取ることです。 ssh: connect to host 172.17.0.2 port 22: Connection refused サーバー側ログ: Starting session: command on pts/1 for client from 172.17.0.3 port 34060 id 0 debug1: Setting controlling tty using TIOCSCTTY. debug1: X11 connection requested. debug1: channel 3: new [X11 connection from 172.17.0.2 port 35028] debug1: Received SIGCHLD. debug1: session_by_pid: pid 9 debug1: session_exit_message: session 0 channel 0 pid 9 debug1: session_exit_message: release channel 0 debug1: session_by_tty: session 0 tty /dev/pts/1 debug1: session_pty_cleanup2: session 0 release /dev/pts/1 debug1: channel 3: free: X11 connection from 172.17.0.2 port 35028, nchannels 4 debug1: session_by_channel: session 0 channel 0 debug1: session_close_by_channel: channel 0 child 0 debug1: session_close_x11: detach x11 channel 1 debug1: session_close_x11: detach x11 channel 2 Close session: user client from 172.17.0.3 port 34060 id 0 debug1: channel 0: free: server-session, nchannels 3 debug1: channel 1: free: X11 inet listener, nchannels 2 debug1: channel 2: free: X11 inet listener, nchannels 1 Received disconnect from 172.17.0.3 port 34060:11: disconnected by user Disconnected from user client 172.17.0.3 port 34060 debug1: do_cleanup debug1: do_cleanup クライアントログ: Running /usr/bin/xauth remove ssh:10.0 /usr/bin/xauth add ssh:10.0 MIT-MAGIC-COOKIE-1 49907415ff518044198f6f0075f270fe debug1: client_input_channel_open: ctype x11 rchan 3 win 65536 max 16384 debug1: client_request_x11: request from 172.17.0.2 35028 debug1: channel 1: new [x11] debug1: confirm x11 OpenSSH_8.8p1, OpenSSL 1.1.1l 24 Aug 2021 debug1: Reading configuration data /etc/ssh/ssh_config debug1: Authenticator provider $SSH_SK_PROVIDER did not resolve; disabling debug1: Connecting to 172.17.0.2 [172.17.0.2] port 22. debug1: connect to address 172.17.0.2 port 22: Connection refused ssh: connect to host 172.17.0.2 port 22: Connection refused xinit: connection to X server lost waiting for X server to shut down debug1: client_input_channel_req: channel 0 rtype exit-status reply 0 debug1: client_input_channel_req: channel 0 rtype [email protected] reply 0 debug1: channel 1: free: x11, nchannels 2 X connection to ssh:10.0 broken (explicit kill or server shutdown). debug1: channel 0: free: client-session, nchannels 1 Connection to 172.17.0.2 closed. Transferred: sent 91292, received 92728 bytes, in 3.1 seconds Bytes per second: sent 29350.8, received 29812.5 debug1: Exit status 1 (II) Server terminated successfully (0). Closing log file. deallocvt: can't open console

Admin

ルータからコンピュータにファイルを受信する方法
ssh
scp
openwrt

ルータからコンピュータにファイルを受信する方法

私のルーターで試したことは次のとおりです。[Eメール保護])。私のコンピュータ上のファイルをSCPとして指定してルータにコピーしたいと思います。 それでは、すでにsshリモート:root @ openwrt:SCP root @ mypcにいる場合はどうなりますか?私のコンピュータ、家の名前/ユーザー名は何ですか?

Admin

Fedora 33からDebian NASへのssh - 常にパスワードを要求する
debian
ssh
fedora

Fedora 33からDebian NASへのssh - 常にパスワードを要求する

NASデバイスとしてWD MyBook Duo(古いですがうまく動作します)があり、次のようにrsyncバックアップスクリプトが設定されています。これ。 この時点でバックアップシステムを実行できますが、パスワードを要求するたびに - 最近Fedora 33にアップグレードするまでこれは起こりませんでした - 理由はわかりません。 私はすべての標準的な手順を経た。 クライアントで ssh-keygen を実行し、id_rsa.pub の内容をサーバーの Authorized_keys にコピーします。 権限の確認 - サーバーの authenticate_keys は 600 で、クライアントの id_rsa は 644 です。クライアントKnown_hostsオン ログインするたびに、(rootまたは他のユーザーとして)常にパスワードの入力を求められます。何が起こっているのかを診断するために/usr/sbin/sshd -d -p 2222サーバー上で実行してから、クライアントからログインしようとしましたが、次のように出力はssh -p 2222 実際には役に立ちませんでした。 ssh-addまた、クライアントまたはサーバーで使用する手順を行いましたが、結果は変わりませんでした。 最後に、ssh-configファイル(下記参照)を調整してみました。 yes行がコメントアウトされたことを確認し、コメントアウトを削除してRSAAuthenticationサービスを再起動しました/etc/init.d/ssh restart。運が悪い。 そして私は詰まった。次に何をすべきかを提案してください。 編集:@patbarronのコメントに従って、RSAの代わりにecdsaを試してみました。同じ結果です。また、authorized_keysルートが所有していることも確認しました。現在、さまざまな理由でrootとしてログインしようとしており、後で他のユーザーに切り替える予定です。結果は同じです。 /usr/sbin/sshd -ddd -p 2222ssh -p 2222ホストとゲストで実行される出力も追加しました。出力にはメッセージが表示されますが、mm_auth_password: user not authenticatedなぜこれが起こるのかを知らせることはありません。 SSHデバッグ出力 debug1: sshd version OpenSSH_5.1p1 Debian-5 debug1: read PEM private key done: type RSA debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-2048 debug1: Checking blacklist file /etc/ssh/blacklist.RSA-2048 debug1: private host key: #0 type 1 RSA debug1: read PEM private key done: type DSA debug1: Checking blacklist file /usr/share/ssh/blacklist.DSA-1024 debug1: Checking blacklist file /etc/ssh/blacklist.DSA-1024 debug1: private host key: #1 type 2 DSA debug1: rexec_argv[0]='/usr/sbin/sshd' debug1: rexec_argv[1]='-d' debug1: rexec_argv[2]='-p' debug1: rexec_argv[3]='2222' debug1: Bind to port 2222 on 0.0.0.0. Server listening on 0.0.0.0 port 2222. debug1: Bind to port 2222 on ::. Server listening on :: port 2222. debug1: Server will not fork when running in debugging mode. debug1: rexec start in 5 out 5 newsock 5 pipe -1 sock 8 debug1: inetd sockets after dupping: 3, 3 Connection from 192.168.1.144 port 57186 debug1: Client protocol version 2.0; client software version OpenSSH_8.4 debug1: match: OpenSSH_8.4 pat OpenSSH* debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_5.1p1 Debian-5 debug1: permanently_set_uid: 101/65534 debug1: list_hostkey_types: ssh-rsa,ssh-dss debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: client->server aes256-ctr hmac-sha1 none debug1: kex: server->client aes256-ctr hmac-sha1 none debug1: SSH2_MSG_KEX_DH_GEX_REQUEST received debug1: SSH2_MSG_KEX_DH_GEX_GROUP sent debug1: expecting SSH2_MSG_KEX_DH_GEX_INIT debug1: SSH2_MSG_KEX_DH_GEX_REPLY sent debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug1: KEX done debug1: userauth-request for user root service ssh-connection method none debug1: attempt 0 failures 0 debug1: PAM: initializing for "root" debug1: PAM: setting PAM_RHOST to "192.168.1.144" debug1: PAM: setting PAM_TTY to "ssh" Failed none for root from 192.168.1.144 port 57186 ssh2 debug1: userauth-request for user root service ssh-connection method password debug1: attempt 1 failures 0 debug1: PAM: password authentication accepted for root debug1: do_pam_account: called Accepted password for root from 192.168.1.144 port 57186 ssh2 debug1: monitor_child_preauth: root has been authenticated by privileged process debug1: PAM: establishing credentials debug1: Entering interactive session for SSH2. debug1: server_init_dispatch_20 debug1: server_input_channel_open: ctype session rchan 0 win 1048576 max 16384 debug1: input_session_request debug1: channel 0: new [server-session] debug1: session_new: session 0 debug1: session_open: channel 0 debug1: session_open: session 0: link with channel 0 debug1: server_input_channel_open: confirm session debug1: server_input_global_request: rtype [email protected] want_reply 0 debug1: server_input_channel_req: channel 0 request pty-req reply 1 debug1: session_by_channel: session 0 channel 0 debug1: session_input_channel_req: session 0 req pty-req debug1: Allocating pty. debug1: session_pty_req: session 0 alloc /dev/pts/2 debug1: Ignoring unsupported tty mode opcode 42 (0x2a) debug1: SELinux support disabled debug1: server_input_channel_req: channel 0 request env reply 0 debug1: session_by_channel: session 0 channel 0 debug1: session_input_channel_req: session 0 req env debug1: server_input_channel_req: channel 0 request env reply 0 debug1: session_by_channel: session 0 channel 0 debug1: session_input_channel_req: session 0 req env debug1: server_input_channel_req: channel 0 request shell reply 1 debug1: session_by_channel: session 0 channel 0 debug1: session_input_channel_req: session 0 req shell debug1: Setting controlling tty using TIOCSCTTY. ssh_config # This is the ssh client system-wide configuration file. See # ssh_config(5) for more information. This file provides defaults for # users, and the values can be changed in per-user configuration files # or on the command line. # Configuration data is parsed as follows: # 1. command line options # 2. user-specific file # 3. system-wide file # Any configuration value is only changed the first time it is set. # Thus, host-specific definitions should be at the beginning of the # configuration file, and defaults at the end. # Site-wide defaults for some commonly used options. For a comprehensive # list of available options, their meanings and defaults, please see the # ssh_config(5) man page. Host * # ForwardAgent no # ForwardX11 no # ForwardX11Trusted yes # RhostsRSAAuthentication no # RSAAuthentication yes # PasswordAuthentication yes # HostbasedAuthentication no # GSSAPIAuthentication no # GSSAPIDelegateCredentials no # GSSAPIKeyExchange no # GSSAPITrustDNS no # BatchMode no # CheckHostIP yes # AddressFamily any # ConnectTimeout 0 # StrictHostKeyChecking ask # IdentityFile ~/.ssh/identity # IdentityFile ~/.ssh/id_rsa # IdentityFile ~/.ssh/id_dsa # Port 22 # Protocol 2,1 # Cipher 3des # Ciphers aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc # MACs hmac-md5,hmac-sha1,[email protected],hmac-ripemd160 # EscapeChar ~ # Tunnel no # TunnelDevice any:any # PermitLocalCommand no SendEnv LANG LC_* HashKnownHosts yes GSSAPIAuthentication yes GSSAPIDelegateCredentials no ホストで/usr/sbin/sshd -ddd -p 2222を実行し、ゲストでssh -p 2222を実行すると出力されます。 debug2: load_server_config: filename /etc/ssh/sshd_config debug2: load_server_config: done config len = 656 debug2: parse_server_config: config /etc/ssh/sshd_config len 656 debug3: /etc/ssh/sshd_config:5 setting Port 22 debug3: /etc/ssh/sshd_config:9 setting Protocol 2 debug3: /etc/ssh/sshd_config:11 setting HostKey /etc/ssh/ssh_host_rsa_key debug3: /etc/ssh/sshd_config:12 setting HostKey /etc/ssh/ssh_host_dsa_key debug3: /etc/ssh/sshd_config:14 setting UsePrivilegeSeparation yes debug3: /etc/ssh/sshd_config:17 setting KeyRegenerationInterval 3600 debug3: /etc/ssh/sshd_config:18 setting ServerKeyBits 768 debug3: /etc/ssh/sshd_config:21 setting SyslogFacility LOCAL3 debug3: /etc/ssh/sshd_config:22 setting LogLevel INFO debug3: /etc/ssh/sshd_config:25 setting LoginGraceTime 120 debug3: /etc/ssh/sshd_config:26 setting PermitRootLogin yes debug3: /etc/ssh/sshd_config:27 setting StrictModes yes debug3: /etc/ssh/sshd_config:28 setting AllowUsers root debug3: /etc/ssh/sshd_config:30 setting RSAAuthentication yes debug3: /etc/ssh/sshd_config:31 setting PubkeyAuthentication yes debug3: /etc/ssh/sshd_config:35 setting IgnoreRhosts yes debug3: /etc/ssh/sshd_config:37 setting RhostsRSAAuthentication no debug3: /etc/ssh/sshd_config:39 setting HostbasedAuthentication no debug3: /etc/ssh/sshd_config:44 setting PermitEmptyPasswords no debug3: /etc/ssh/sshd_config:48 setting ChallengeResponseAuthentication no debug3: /etc/ssh/sshd_config:63 setting X11Forwarding yes debug3: /etc/ssh/sshd_config:64 setting X11DisplayOffset 10 debug3: /etc/ssh/sshd_config:65 setting PrintMotd no debug3: /etc/ssh/sshd_config:66 setting PrintLastLog yes debug3: /etc/ssh/sshd_config:67 setting TCPKeepAlive yes debug3: /etc/ssh/sshd_config:74 setting AcceptEnv LANG LC_* debug3: /etc/ssh/sshd_config:76 setting Subsystem sftp /usr/lib/openssh/sftp-server debug3: /etc/ssh/sshd_config:78 setting UsePAM yes debug1: sshd version OpenSSH_5.1p1 Debian-5 debug3: Not a RSA1 key file /etc/ssh/ssh_host_rsa_key. debug1: read PEM private key done: type RSA debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-2048 debug1: Checking blacklist file /etc/ssh/blacklist.RSA-2048 debug1: private host key: #0 type 1 RSA debug3: Not a RSA1 key file /etc/ssh/ssh_host_dsa_key. debug1: read PEM private key done: type DSA debug1: Checking blacklist file /usr/share/ssh/blacklist.DSA-1024 debug1: Checking blacklist file /etc/ssh/blacklist.DSA-1024 debug1: private host key: #1 type 2 DSA debug1: rexec_argv[0]='/usr/sbin/sshd' debug1: rexec_argv[1]='-ddd' debug1: rexec_argv[2]='-p' debug1: rexec_argv[3]='2222' debug2: fd 3 setting O_NONBLOCK debug1: Bind to port 2222 on 0.0.0.0. Server listening on 0.0.0.0 port 2222. debug2: fd 4 setting O_NONBLOCK debug1: Bind to port 2222 on ::. Server listening on :: port 2222. debug3: fd 5 is not O_NONBLOCK debug1: Server will not fork when running in debugging mode. debug3: send_rexec_state: entering fd = 8 config len 656 debug3: ssh_msg_send: type 0 debug3: send_rexec_state: done debug1: rexec start in 5 out 5 newsock 5 pipe -1 sock 8 debug1: inetd sockets after dupping: 3, 3 Connection from 192.168.1.144 port 60860 debug1: Client protocol version 2.0; client software version OpenSSH_8.4 debug1: match: OpenSSH_8.4 pat OpenSSH* debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_5.1p1 Debian-5 debug2: fd 3 setting O_NONBLOCK debug2: Network child is on pid 12958 debug3: preauth child monitor started debug3: mm_request_receive entering debug3: privsep user:group 101:65534 debug1: permanently_set_uid: 101/65534 debug1: list_hostkey_types: ssh-rsa,ssh-dss debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 debug2: kex_parse_kexinit: ssh-rsa,ssh-dss debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes192-cbc,aes256-cbc,[email protected],aes128-ctr,aes192-ctr,aes256-ctr debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes192-cbc,aes256-cbc,[email protected],aes128-ctr,aes192-ctr,aes256-ctr debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,[email protected],hmac-ripemd160,[email protected],hmac-sha1-96,hmac-md5-96 debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,[email protected],hmac-ripemd160,[email protected],hmac-sha1-96,hmac-md5-96 debug2: kex_parse_kexinit: none,[email protected] debug2: kex_parse_kexinit: none,[email protected] debug2: kex_parse_kexinit: debug2: kex_parse_kexinit: debug2: kex_parse_kexinit: first_kex_follows 0 debug2: kex_parse_kexinit: reserved 0 debug2: kex_parse_kexinit: curve25519-sha256,[email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,ext-info-c debug2: kex_parse_kexinit: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,[email protected],ssh-ed25519,[email protected],rsa-sha2-512,rsa-sha2-256,ssh-rsa debug2: kex_parse_kexinit: [email protected],[email protected],aes256-ctr,[email protected],aes128-ctr debug2: kex_parse_kexinit: [email protected],[email protected],aes256-ctr,[email protected],aes128-ctr debug2: kex_parse_kexinit: [email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha1,[email protected],hmac-sha2-512 debug2: kex_parse_kexinit: [email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha1,[email protected],hmac-sha2-512 debug2: kex_parse_kexinit: none,[email protected],zlib debug2: kex_parse_kexinit: none,[email protected],zlib debug2: kex_parse_kexinit: debug2: kex_parse_kexinit: debug2: kex_parse_kexinit: first_kex_follows 0 debug2: kex_parse_kexinit: reserved 0 debug2: mac_setup: found hmac-sha1 debug1: kex: client->server aes256-ctr hmac-sha1 none debug2: mac_setup: found hmac-sha1 debug1: kex: server->client aes256-ctr hmac-sha1 none debug1: SSH2_MSG_KEX_DH_GEX_REQUEST received debug3: mm_request_send entering: type 0 debug3: monitor_read: checking request 0 debug3: mm_answer_moduli: got parameters: 2048 8192 8192 debug3: mm_choose_dh: waiting for MONITOR_ANS_MODULI debug3: mm_request_receive_expect entering: type 1 debug3: mm_request_receive entering debug3: mm_request_send entering: type 1 debug3: mm_choose_dh: remaining 0 debug1: SSH2_MSG_KEX_DH_GEX_GROUP sent debug2: monitor_read: 0 used once, disabling now debug3: mm_request_receive entering debug2: dh_gen_key: priv key bits set: 268/512 debug2: bits set: 4095/8192 debug1: expecting SSH2_MSG_KEX_DH_GEX_INIT debug2: bits set: 4103/8192 debug3: mm_key_sign entering debug3: mm_request_send entering: type 5 debug3: monitor_read: checking request 5 debug3: mm_answer_sign debug3: mm_key_sign: waiting for MONITOR_ANS_SIGN debug3: mm_request_receive_expect entering: type 6 debug3: mm_request_receive entering debug3: mm_answer_sign: signature 0x2073df70(271) debug3: mm_request_send entering: type 6 debug1: SSH2_MSG_KEX_DH_GEX_REPLY sent debug2: kex_derive_keys debug2: set_newkeys: mode 1 debug2: cipher_init: set keylen (16 -> 32) debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug2: monitor_read: 5 used once, disabling now debug3: mm_request_receive entering debug2: set_newkeys: mode 0 debug2: cipher_init: set keylen (16 -> 32) debug1: SSH2_MSG_NEWKEYS received debug1: KEX done debug1: userauth-request for user root service ssh-connection method none debug1: attempt 0 failures 0 debug3: mm_getpwnamallow entering debug3: mm_request_send entering: type 7 debug3: mm_getpwnamallow: waiting for MONITOR_ANS_PWNAM debug3: mm_request_receive_expect entering: type 8 debug3: mm_request_receive entering debug3: monitor_read: checking request 7 debug3: mm_answer_pwnamallow debug3: Trying to reverse map address 192.168.1.144. debug2: parse_server_config: config reprocess config len 656 debug3: mm_answer_pwnamallow: sending MONITOR_ANS_PWNAM: 1 debug3: mm_request_send entering: type 8 debug2: input_userauth_request: setting up authctxt for root debug3: mm_start_pam entering debug3: mm_request_send entering: type 48 debug3: mm_inform_authserv entering debug3: mm_request_send entering: type 3 debug2: input_userauth_request: try method none debug3: mm_auth_password entering debug3: mm_request_send entering: type 11 debug3: mm_auth_password: waiting for MONITOR_ANS_AUTHPASSWORD debug3: mm_request_receive_expect entering: type 12 debug3: mm_request_receive entering debug2: monitor_read: 7 used once, disabling now debug3: mm_request_receive entering debug3: monitor_read: checking request 48 debug1: PAM: initializing for "root" debug1: PAM: setting PAM_RHOST to "192.168.1.144" debug1: PAM: setting PAM_TTY to "ssh" debug2: monitor_read: 48 used once, disabling now debug3: mm_request_receive entering debug3: monitor_read: checking request 3 debug3: mm_answer_authserv: service=ssh-connection, style=, role= debug2: monitor_read: 3 used once, disabling now debug3: mm_request_receive entering debug3: monitor_read: checking request 11 debug3: mm_answer_authpassword: sending result 0 debug3: mm_request_send entering: type 12 debug3: mm_auth_password: user not authenticated Failed none for root from 192.168.1.144 port 60860 ssh2 debug3: mm_request_receive entering debug1: userauth-request for user root service ssh-connection method password debug1: attempt 1 failures 0 debug2: input_userauth_request: try method password debug3: mm_auth_password entering debug3: mm_request_send entering: type 11 debug3: mm_auth_password: waiting for MONITOR_ANS_AUTHPASSWORD debug3: mm_request_receive_expect entering: type 12 debug3: mm_request_receive entering debug3: monitor_read: checking request 11 debug3: PAM: sshpam_passwd_conv called with 1 messages debug1: PAM: password authentication accepted for root debug3: mm_answer_authpassword: sending result 1 debug3: mm_request_send entering: type 12 debug3: mm_auth_password: user authenticated debug3: mm_do_pam_account entering debug3: mm_request_send entering: type 49 debug3: mm_request_receive_expect entering: type 50 debug3: mm_request_receive entering debug3: mm_request_receive_expect entering: type 49 debug3: mm_request_receive entering debug1: do_pam_account: called debug3: PAM: do_pam_account pam_acct_mgmt = 0 (Success) debug3: mm_request_send entering: type 50 debug3: mm_do_pam_account returning 1 debug3: mm_send_keystate: Sending new keys: 0x2073db38 0x2073da30 debug3: mm_newkeys_to_blob: converting 0x2073db38 debug3: mm_newkeys_to_blob: converting 0x2073da30 debug3: mm_send_keystate: New keys have been sent debug3: mm_send_keystate: Sending compression state debug3: mm_request_send entering: type 25 debug3: mm_send_keystate: Finished sending state Accepted password for root from 192.168.1.144 port 60860 ssh2 debug1: monitor_child_preauth: root has been authenticated by privileged process debug3: mm_get_keystate: Waiting for new keys debug3: mm_request_receive_expect entering: type 25 debug3: mm_request_receive entering debug3: mm_newkeys_from_blob: 0x20743238(139) debug2: mac_setup: found hmac-sha1 debug3: mm_get_keystate: Waiting for second key debug3: mm_newkeys_from_blob: 0x20743238(139) debug2: mac_setup: found hmac-sha1 debug3: mm_get_keystate: Getting compression state debug3: mm_get_keystate: Getting Network I/O buffers debug3: mm_share_sync: Share sync debug3: mm_share_sync: Share sync end debug1: PAM: establishing credentials debug3: PAM: opening session debug3: PAM: sshpam_store_conv called with 1 messages debug2: set_newkeys: mode 0 debug2: cipher_init: set keylen (16 -> 32) debug2: set_newkeys: mode 1 debug2: cipher_init: set keylen (16 -> 32) debug1: Entering interactive session for SSH2. debug2: fd 5 setting O_NONBLOCK debug2: fd 6 setting O_NONBLOCK debug1: server_init_dispatch_20 debug1: server_input_channel_open: ctype session rchan 0 win 1048576 max 16384 debug1: input_session_request debug1: channel 0: new [server-session] debug2: session_new: allocate (allocated 0 max 10) debug3: session_unused: session id 0 unused debug1: session_new: session 0 debug1: session_open: channel 0 debug1: session_open: session 0: link with channel 0 debug1: server_input_channel_open: confirm session debug1: server_input_global_request: rtype [email protected] want_reply 0 debug1: server_input_channel_req: channel 0 request pty-req reply 1 debug1: session_by_channel: session 0 channel 0 debug1: session_input_channel_req: session 0 req pty-req debug1: Allocating pty. debug1: session_pty_req: session 0 alloc /dev/pts/1 debug3: tty_parse_modes: SSH2 n_bytes 261 debug3: tty_parse_modes: ospeed 38400 debug3: tty_parse_modes: ispeed 38400 debug1: Ignoring unsupported tty mode opcode 42 (0x2a) debug1: SELinux support disabled debug1: server_input_channel_req: channel 0 request env reply 0 debug1: session_by_channel: session 0 channel 0 debug1: session_input_channel_req: session 0 req env debug2: Setting env 0: LANG=en_US.UTF-8 debug1: server_input_channel_req: channel 0 request env reply 0 debug1: session_by_channel: session 0 channel 0 debug1: session_input_channel_req: session 0 req env debug2: Ignoring env request LANGUAGE: disallowed name debug1: server_input_channel_req: channel 0 request env reply 0 debug1: session_by_channel: session 0 channel 0 debug1: session_input_channel_req: session 0 req env debug2: Ignoring env request XMODIFIERS: disallowed name debug1: server_input_channel_req: channel 0 request shell reply 1 debug1: session_by_channel: session 0 channel 0 debug1: session_input_channel_req: session 0 req shell debug2: fd 3 setting TCP_NODELAY debug2: channel 0: rfd 9 isatty debug2: fd 9 setting O_NONBLOCK debug3: fd 7 is O_NONBLOCK debug1: Setting controlling tty using TIOCSCTTY.

Admin

どのアプリケーションが自分のコンピュータにファイルをダウンロードしたのか、どうすればわかりますか?
ssh
files
arch-linux
security
aur

どのアプリケーションが自分のコンピュータにファイルをダウンロードしたのか、どうすればわかりますか?

今日、日常的なシステム整理作業をしていましたが、ダウンロードフォルダにダウンロードしていないファイル4つ(アダルトビデオ以上)があることがわかりました。 どこから来たのか、どのアプリケーションが自分のコンピュータに追加されたのか、どうすればわかりますか?私が知らない接続が入っているかどうかを確認する方法はありますか?おそらくsystemdのログやdmesgにありますか? openSSHをインストールしましたが、サーバーが確立されておらず、デフォルトでは接続を許可しません。そしてここ数日間、ある時点でlbry.tvアプリをテストしてみました。これAUR pkgには奇妙なものがインストールされていないようです。 私以外は誰も私のコンピュータにアクセスできないことに注意してください。 5.9.14-arch1-1カーネルで実行中です。

Admin

Xfce4デスクトップを起動する方法
bash
ssh
terminal
xfce
xfce4-terminal

Xfce4デスクトップを起動する方法

私のコンピュータにSSH接続があります。マイコンピュータのユーザーアカウントのxfce4セッションにログイン/作成し、ログインするために起動時にどのコマンドを実行できますか?つまり、起動時にSSHを介してどのようにロックを解除できますか?

Admin

SSH経由でリモートサーバーに接続するときにローカル端末のカラースキームをどのように使用しますか?
linux
ssh
color-management

SSH経由でリモートサーバーに接続するときにローカル端末のカラースキームをどのように使用しますか?

私が望むように配色が設定されたローカル端末があります。この端末を介してリモートサーバーにSSHで接続すると、私の端末はリモート端末のカラースキームを採用します。リモート端末の代わりに自分のローカル端末のカラースキームを使用する方法はありますか?

Admin

スクリプト機能でシェルを変更する
ssh
zsh
function
expect

スクリプト機能でシェルを変更する

メインシェルとしてZSHがありますが、.zshrcビルドを更新するときに私の開発ボックスにsshを簡単に接続できるようにExpectを使用してsshコマンドを設定したいと思います(実際にはセキュリティは必要ありません。これはすべてオンです)。イントラネット)の一種)。sshシェルを使用してパスワードを渡すことができます!#/usr/bin/expect。 これはコーシャですか? password=sick_awesome_password6969 function expect_ssh () { # I enter expect shell at the beginning of this function <== #!/usr/bin/expect set timeout 20 set cmd [lrange $argv 1 end] set password [lindex $argv 0] eval spawn $cmd expect "password:" send "$password\r"; interact exit 0 # Then escape from it ? <== } default_boxssh_subnet=1 function bosh () { if [[ ! $1 == *"."* ]]; then # ssh [email protected].$default_boxssh_subnet.$1 expect_ssh 10.10.$default_boxssh_subnet.$1 else # ssh [email protected].$1 expect_ssh 10.10.$default_boxssh_subnet.$1 fi }

Admin

2 つのサーバーをプロキシとして使用
ssh
proxy
webserver

2 つのサーバーをプロキシとして使用

途中で2つのサーバー(AとB)を持つプロキシを実装したいと思います。トラフィックはマイコンピュータからサーバーBに移動し、サーバーAに移動してデータを取得します。 ~/.ssh/configでこの設定を使用することがわかりました。 HOST B HostName B user debian DynamicForward 0.0.0.0:1081 1081 ポートをプロキシとして使用できます。しかし、今はA経由でBのすべてのトラフィックをプロキシする方法がわかりません。 これは私のSSHバージョンです。 OpenSSH_7.2p2 Ubuntu-4ubuntu2.8, OpenSSL 1.0.2g 2016年3月1日

Admin

リバースSSHトンネルでconnect_to localhostポート9190:失敗が発生するのはなぜですか?
ssh
networking
ssh-tunneling

リバースSSHトンネルでconnect_to localhostポート9190:失敗が発生するのはなぜですか?

こんにちは。私は大学のリモートサーバーを使用してリバースSSHトンネルを作成しようとしています。私のラップトップで次のコマンドを実行します。 < home >$ ssh -R 9999:localhost:9190 my_user@school_server.edu その後、別の端末を開いて実行します。 < home >$ nc -l 9190 トンネルを作成した端末でログインしたら、次を実行します。 < university >$ nc localhost 9999 他のコンピュータで試してみると、リモートサーバーとローカルコンピュータの接続に問題はありませんが、ラップトップではこのようになります。 < university >$ connect_to localhost port 9190: failed. リモートサーバーでncコマンドを実行するとき。 ラップトップにMacOSとManjaroの両方がインストールされており、両方に問題があるため、ファイアウォールやOSネットワーク構成の問題ではありません。別のネットワークを試してみましたが、問題は解決しません。私はちょうど私の妹のラップトップで同じことをしようとしました、そして私のクラスメートも問題なく働いたので、リモートサーバーは問題になりませんでした。 このような問題が発生する原因は何ですか?ありがとうございます。 編集:非逆方向トンネリングがうまく機能するという事実に言及するのを忘れました。 追加情報:-vフラグを使用して実行すると、接続しようとすると次のように出力されます。 debug1: client_input_channel_open: ctype forwarded-tcpip rchan 3 win 2097152 max 32768 debug1: client_request_forwarded_tcpip: listen localhost port 9999, originator 127.0.0.1 port 34590 debug1: connect_next: host 127.0.0.1 ([127.0.0.1]:9190) in progress, fd=9 debug1: channel 1: new [127.0.0.1] debug1: confirm forwarded-tcpip debug1: channel 1: connection failed: Connection refused connect_to 127.0.0.1 port 9190: failed. debug1: channel 1: free: 127.0.0.1, nchannels 2

Admin

特定のディレクトリに限定されたCentos SSHおよびSFTPユーザー
centos
ssh
permissions
security
restricted-shell

特定のディレクトリに限定されたCentos SSHおよびSFTPユーザー

私はCantos 7を実行しているサーバーを管理しています。一部のユーザーは開発のためにssh / sftpを介してサーバーにログインします。私は彼らのためにユーザーを作成しましたdevel。セキュリティ上の理由から、特定のディレクトリに制限する必要があります。彼らは次のことができるはずです。 cd、、、、、、lsなどの基本コマンドのみを実行してcpください。catmvmkdirrmdir などjavaのプログラムを実行します。gccpython develrwxフルアクセス許可()でホームディレクトリ()にアクセスします。 /mnt/dataspaceすべての権限でマウントされたハードドライブにアクセスします(rwx)。 他のいくつかのディレクトリ()へのフルアクセス権があります/usr/lib。/usr/srcrwx 予防したいことdevel: /、、/bootなど、他のすべてのディレクトリにアクセスします/etc。/opt/var httpdなどの特定のサービス/デーモンにアクセスします。sshdmysqld 上記の基本コマンドを除くすべてのコマンドを実行します(例:)systemctl。 私はこれらのディレクトリ(たとえば、など)がそれらに表示されたくない場合、/または少なくともそのディレクトリへのアクセスを無効にしたくありません。/etc/var できますか?私はここで多くの質問とACLとChroot Jail ercに関する多くの記事、フォーラム、ブログを読んでいます。例えばこれ、これ、これ、これ、これ、これ、これ、これ、これ、これ、これしかし、それらのどれも私がしなければならないことを達成するのを助けませんでした。 どんな助けやアドバイスにも感謝します。助けが切実に必要です。

Admin

X転送GNOME端末インスタンスでGUIアプリケーションを実行するにはどうすればよいですか?
ssh
xforwarding

X転送GNOME端末インスタンスでGUIアプリケーションを実行するにはどうすればよいですか?

私は通常Xに渡されるGNOMEターミナルセッションで作業します。 local-machine$ ssh -X remote-machine gnome-terminal ローカル端末でSSHを実行する代わりに、これを行います。これは、新しいタブがリモートホストの同じディレクトリで開かれるためです(関連する未解決の問題)。 このX転送端末でGUIプログラムを起動しようとすると失敗することがわかりました。 remote-machine$ gedit (gedit:49577): Gtk-WARNING **: 14:32:45.928: cannot open display: localhost:13.0 ただし、別のXフォワードシェルセッションも実行してそのままにする場合: local-machine$ ssh -X remote-machine geditその後、X転送GNOMEターミナルインスタンスと同様にGUIアプリケーションを実行できます。 このソリューションが機能するのはなぜですか?これを行うより簡単な方法はありますか(たとえば、コマンドに追加できるフラグssh -X remote-machine gnome-terminal)。

Admin