- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我正在尝试连接我的服务器和 ssh 告诉我:sh: 6000: command not found
打击是 ssh 详细日志和我的 sshd_config。
[~] # ssh -v admin@myserver -P 6000
OpenSSH_7.6p1, OpenSSL 1.0.2k 26 Jan 2017
debug1: Connecting to 192.168.50.21 [192.168.50.21] port 6000.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: identity file /root/.ssh/id_rsa type 0
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ed25519-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_7.6
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.6
debug1: match: OpenSSH_7.6 pat OpenSSH* compat 0x04000000
debug1: Authenticating to 192.168.50.216000 as 'admin'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: rsa-sha2-512
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ssh-rsa SHA256:XTuaKA/5nJd1wol9+Ckp0or8XCx3Rd/0NGMIdT9lrro
debug1: Host '192.168.50.21' is known and matches the RSA host key.
debug1: Found key in /root/.ssh/known_hosts:2
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521>
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Offering public key: RSA SHA256:XTuaKA/5nJd1wol9+Ckp0or8XCx3Rd/0NGMIdT9lrro /root/.ssh/id_rsa
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Trying private key: /root/.ssh/id_dsa
debug1: Trying private key: /root/.ssh/id_ecdsa
debug1: Trying private key: /root/.ssh/id_ed25519
debug1: Next authentication method: keyboard-interactive
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: password
admin@192.168.50.21's password:
debug1: Authentication succeeded (password).
Authenticated to 192.168.50.21 ([192.168.50.21]6000).
debug1: channel 0: new [client-session]
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug1: pledge: network
debug1: client_input_global_request: rtype hostkeys-00@openssh.com want_reply 0
debug1: Sending command: 6000
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: client_input_channel_req: channel 0 rtype eow@openssh.com reply 0
sh: 6000: command not found
debug1: channel 0: free: client-session, nchannels 1
Transferred: sent 2248, received 3052 bytes, in 0.2 seconds
Bytes per second: sent 14674.8, received 19923.2
debug1: Exit status 127
这是我的 sshd 配置
# $OpenBSD: sshd_config,v 1.74 2006/07/19 13:07:10 dtucker 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 change a
# default value.
#Port 22
#Protocol 2,1
Protocol 2
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::
# HostKey for protocol version 1
#HostKey /etc/ssh/ssh_host_key
# HostKeys for protocol version 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
# Lifetime and size of ephemeral version 1 server key
#KeyRegenerationInterval 1h
#ServerKeyBits 768
# Logging
# obsoletes QuietMode and FascistLogging
#SyslogFacility AUTH
#LogLevel INFO
# Authentication:
#LoginGraceTime 2m
PermitRootLogin yes
#StrictModes yes
#MaxAuthTries 6
#RSAAuthentication yes
#PubkeyAuthentication yes
#AuthorizedKeysFile .ssh/authorized_keys
# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#RhostsRSAAuthentication no
# similar for protocol version 2
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# RhostsRSAAuthentication and 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 yes
#PermitEmptyPasswords no
# Change to no to disable s/key passwords
#ChallengeResponseAuthentication yes
# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#KerberosGetAFSToken no
# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes
# 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 no
#AllowTcpForwarding yes
#GatewayPorts no
#X11Forwarding no
#X11DisplayOffset 10
#X11UseLocalhost yes
#PrintMotd yes
#PrintLastLog yes
#TCPKeepAlive yes
#UseLogin no
#PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0
#ClientAliveCountMax 3
UseDNS no
#PidFile /var/run/sshd.pid
#MaxStartups 10
#PermitTunnel no
# no default banner path
#Banner /some/path
# override default of no subsystems
Subsystem sftp /usr/libexec/sftp-server
AllowUsers admin
# Example of overriding settings on a per-user basis
#Match User anoncvs
# X11Forwarding no
# AllowTcpForwarding no
# ForceCommand cvs server
我不知道为什么这里会出现这个错误。我使用一个名为 ssh shell 的 mac 软件它可以连接到我的服务器。我很确定密码是正确的。
最佳答案
你的命令行并没有按照你想象的那样做。
ssh -v admin@myserver -P 6000
-v
启用一些调试信息admin@myserver
提供远程用户和远程主机-P 6000
确实不尝试连接到端口 6000您可能想要的命令是:
ssh -v admin@myserver -p 6000
然而,事实证明-P
是一个undocumented argument ssh 接受。
这留下了一个下落不明的参数6000
。 ssh 假定这是您要在远程服务器上运行的命令。它不存在,这会导致显示错误:
sh: 6000: command not found
关于linux - 无法连接 ssh sh : 6000: command not found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55078370/
我发现了以下区别: catalina.sh 运行 ---> 在前台启动 tomcat。 startup.sh ---> 在写入响应时在后台启动 tomcat在日志文件中。 我找不到与此命令的比较: t
这个问题已经有答案了: 已关闭11 年前。 Possible Duplicate: Whats the difference between running a shell script as ./s
我正在尝试使用 bash 和数组。但是执行示例脚本时,我收到了意外的语法错误消息:example.sh: 3: example.sh: Syntax error: "("unexpected。这是脚本
我有文件 config.sh: data_dir=/home/olle/investing_data bin_dir=/home/olle/investing_bin 我想在两个单独的脚本a.sh 和
我正在处理一个 sh 脚本,其中我处于 WHILE 循环中,其中每次迭代都会增加一个变量,并且我想每五次迭代保存一个文件。 我通常会做的(用 C 语言说)是做一个 if ( n % 5 == 0)测试
这个 STR="Hello\nWorld" echo $STR 作为输出产生 Hello\nWorld 而不是 Hello World 如何在字符串中添加换行符? 注意:这个问题与echo无关。我知道
这个 STR="Hello\nWorld" echo $STR 作为输出产生 Hello\nWorld 代替 Hello World 我应该怎么做才能在字符串中换行? 注意:这个问题不是关于echo的
我有一个看起来像这样的脚本 #!/bin/bash function something() { echo "hello world!!" } something | tee logfile 我已经
在这里,我有一个名为 load.sh 的 shell 脚本。 它用监督启动我名为“demo”的程序,当我用 sh load.sh start | 运行它时停止,它运行良好。 但是,当我使用 ./loa
我刚刚从官方网站下载了 robomongo 64 位的 ubuntu。然后我打开我的终端并查看文件夹结构并从 bin 文件夹执行命令。 sh robomongo.sh 我遇到这样的错误 robomon
这个问题已经有答案了: What is the difference between `./example.sh` and `sh example.sh` (3 个回答) 已关闭 8 年前。 使用 .
我正在尝试从 c 程序执行在 Linux 中启动新终端的命令 sh,但我收到此错误/bin/sh:/bin/sh: 当我使用 execv () 时无法执行二进制文件结果是 fork,然后是 execv
我想在我的 sh 脚本中使用数组 我的目标是为以下值创建数组 - a b c并按数组打印所有值 我成功打印每个数组,但未能打印数组中的所有值 请看下面的例子 设置arr中的每个值 n=1 eval a
我基本上正在寻找一种方法来做到这一点 list=$(command) while read -r arg do ... done output & while read -r arg
我部署了一个 Surge.sh 项目并成功发布,但是,我想对该项目进行一些更新,更新已在本地应用并且可以看到工作,但它尝试再次将其发布到同一个域但它没有'没有出现更新。我还尝试拆除该项目并重新上传它仍
我在 CentOS 上运行调用远程 sh 文件的 sh 脚本时遇到问题。在 user@host1 我有 start.sh 文件,里面有下一个命令 NODE1_SSH_PATH=user@host2 P
我是surge.sh plus客户,拥有自定义域,比方说 http://bobswidgets.com 但是,Bob 要求我为他的新定制服务设置一个子域。他要custom.bobswidgets.co
$ sh sh-3.2$ if > ps -ef | grep apple ; > then > echo APPLE > fi ; lazer 7584 7571 0 04:36 pts/4
我正在使用 bash shell 导出一些路径,如下所示: 环境.sh: export GOPATH=$GOPATH:$QBOXROOT/pili-zeus export PATH=$PATH:$
我在采购别名方面遇到了问题。这确实是具体案例。我使用 open_new.sh 打开带有两个选项卡的新终端窗口: #!/bin/bash gnome-terminal --tab --t
我是一名优秀的程序员,十分优秀!