ssh client 报 algorithm negotiation failed 错误,修改sshd_config,重启服务失败

1)window系统打开ssh client 连接centos失败提示
图片说明

2)报 algorithm negotiation failed错误
3)根据网上查找在centos中修改配置文件/etc/ssh/sshd_config

# vi /etc/ssh/sshd_config

添加

Ciphers aes128-cbc,aes192-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr,3des-cbc,arcfour128,arcfour256,arcfour,blowfish-cbc,cast128-cbc

MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-sha1-96,hmac-md5-96
KexAlgorithms diffie-hellman-group1-sha1,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group-exchange-sha256,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nis
tp521,diffie-hellman-group1-sha1,curve25519-sha256@libssh.org

保存

4)重启服务
service sshd restart

5)重启失败 :
图片说明

应该如何解决

1个回答

要看错误日志,为什么重启失败,看是不是不支持你做的修改。

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
java使用SSH方式上传报错:Algorithm negotiation fail

java用jsch实现文件传输(SSH形式),但是好像本地和服务器加密方式不一致,一直报错: com.jcraft.jsch.JSchException: Algorithm negotiation fail

JSCH连接SFTP服务Algorithm negotiation fail

JAVA环境: java version "1.6.0_45" Java(TM) SE Runtime Environment (build 1.6.0_45-b06) Java HotSpot(TM) Server VM (build 20.45-b01, mixed mode) jsch-0.1.42.jar SFTP环境: OpenSSH_6.7p1, OpenSSL 1.0.1j 15 Oct 2014。 现象就是应用程序客户端始终SFTP连接不了服务端,导致很多功能不能使用。 而在一些旧版本的OpenSSL机器上,如0.9.8e版本上是没有问题的,只要一升级OpenSSL就会导致该问题。 尝试思路: 1. **JSCH版本过低,不支持最新版本OpenSSL导致的。** 升级到JSCH 0.1.51版本后依然不行。 2. **JSCH不支持ECDSA算法,是无法使用最新OpenSSL的。** 为JSCH添加支持ECDSA算法的插件--->未测试。 有没有哪位大神指明一下? 3. **使用SSH调试模式连接:** *debug1:no match JSCH-0.1.51 ... debug1:list_hostkey_types:ssh-rsa, ssh-dss,ecdsa-sha2-nistp256,ssh-ed25519[preauth] ... debug1:kex:client->server aes128-ctr hmac-sha1 none [preauth] debug1:kex:server->client aes128-ctr hmac-sha1 none [preauth] debug1:Unable to negotiate a key exchange method [preauth]* ... 然后尝试在sshd_config中添加了 *Ciphers aes128-ctr,aes192-ctr,aes256-ctr* 还是不行。 求哪位大神指教一下,给个思路。

sftp用证书文件登录报algorithm negotiation fail

请教各位大神,我要使用sftp传输文件,可以再登录这块出现了问题几天都没找到解决方法 开发语言C# 用的是网上开源的Tamir.SharpSSH.dll 对方提供了host name和user name 用工具PuTTY在本机生成了2个文件 public key和private key public key已传给对方加过白名单了 用工具WinSCP 输入host name 和user name再传入private key file可以登录连上对方 但是用网上开源的Tamir.SharpSSH.dll和代码连击不上 这是登录的代码 private Session m_session; private Channel m_channel; private ChannelSftp m_sftp; //host:sftp地址 user:用户名 pwd:密码 public Helper(string host, string user, string pwd, string privateKey) { string[] arr = host.Split(':'); string ip = arr[0]; int port = 22; if (arr.Length > 1) port = Int32.Parse(arr[1]); JSch jsch = new JSch(); string passphrase = ""; if (privateKey != null && !"".Equals(privateKey)) { if (passphrase != null && !"".Equals(passphrase)) { //设置带口令的密钥 jsch.addIdentity(privateKey, passphrase); } else { //设置不带口令的密钥 jsch.addIdentity(privateKey); } } m_session = jsch.getSession(user, ip, port); MyUserInfo ui = new MyUserInfo(); ui.setPassword(pwd); m_session.setUserInfo(ui); } //登录验证信息 public class MyUserInfo : UserInfo { String passwd; public String getPassword() { return passwd; } public void setPassword(String passwd) { this.passwd = passwd; } public String getPassphrase() { return null; } public bool promptPassphrase(String message) { return true; } public bool promptPassword(String message) { return true; } public bool promptYesNo(String message) { return true; } public void showMessage(String message) { } } //SFTP连接状态 public bool Connected { get { return m_session.isConnected(); } } //连接SFTP public bool Connect() { try { if (!Connected) { m_session.connect(); m_channel = m_session.openChannel("sftp"); m_channel.connect(); m_sftp = (ChannelSftp)m_channel; } return true; } catch { return false; } } private key是个.ppk的文件 登录时会报异常 ![图片说明](https://img-ask.csdn.net/upload/201508/18/1439867038_646861.png) 用PuTTY工具 把.ppa文件转成OpenSSH key 再去执行登录报异常 ![图片说明](https://img-ask.csdn.net/upload/201508/18/1439867114_780724.png) 实在没方向了 不知道怎么去做登录了 求做过C#用文件 在程序中登录大神们指点下

GoLang:“没有通用的密钥交换算法”错误

<div class="post-text" itemprop="text"> <p>I am new to GoLang and I am trying to connect to a remote server using go. But I keep getting the following error</p> <pre><code>Failed to dial: ssh: handshake failed: ssh: no common algorithm for key exchange; client offered: [curve2****-sh****@libssh.org ****-sha*-nis****ecdh-sha2-nistp384 ecdh-sha2-nistp**** diffie-hellman-group14-sha1 diffie-hellman-group1-sha1], server offered: [diffie-hellman-group-exchange-sha***] </code></pre> <p>below is the config that I use to connect</p> <pre><code> config := &amp;ssh.ClientConfig{ User: user, HostKeyCallback: nil, Auth: []ssh.AuthMethod{ publicKey, }, } </code></pre> </div>

拨号失败:握手失败:ssh:没有通用算法golang的ssh客户端错误

<div class="post-text" itemprop="text"> <p>I'm working on a project that is using <a href="https://github.com/jlaffaye/goftp" rel="nofollow">goftp</a> to upload to a server, but (thanks to the kind people here) I will use a more secure method. </p> <p>I plan to use ssh instead and found this ssh client in golang found <a href="https://gist.github.com/linuz-ly/4148437" rel="nofollow">here</a>. </p> <p>I have setup an ssh server (freeSSHd) and can successfully connect through PuTTY both locally and on another machine.</p> <p>I have only changed this part of the client to replace the variables with my own</p> <pre><code>var ( server = "127.0.0.1:22" username = "username" password = clientPassword("password") ) </code></pre> <p>When I execute the ssh client, ssh.Dial returns an error, and the panic displays this: <strong>"Failed to dial: handshake failed: ssh: no common algorithms"</strong></p> <pre><code>client, err := ssh.Dial("tcp", "127.0.0.1:22", config) if err != nil { panic("Failed to dial: " + err.Error()) } </code></pre> <p>I am new to golang so I would appreciate any help to point me in the right direction. Thanks in advance.</p> </div>

为什么用scp登录linux报错Algorithm negotiation fail,不懂是为什么

``` Scp scp = new Scp("192.168.1.100", "linaro", "linaro"); scp.Connect(); scp.Get("/etc/r2", "packages"); scp.Close(); return true; ```

使用SFTP和PHP或shell / terminal脚本传输文件

<div class="post-text" itemprop="text"> <p>I need to write a script that is run as a cron job every night which transfers some report files via sftp to another server.</p> <p>The report files are created every night using another cron in the format 'support_[date].csv' &amp; 'download_[date].csv'.</p> <p>I'm wondering if you had any pointers on how to do the following:</p> <ol> <li>Find the 2 files created on latest [date]</li> <li>Copy these files to another server using SFTP</li> </ol> <p>I've tried several PHP scripts utilising the ssh2 extension, but to no avail. Is there a way to do it using a shell script? It's not something I am hugely familiar with to be honest (hence going down the PHP route initially)</p> <p>This was one of my PHP scripts which didn't work:</p> <pre><code>$src = 'test.csv'; $filename = 'test.csv'; $dest = '/destination_directory_on_server/'.$filename; $connection = ssh2_connect('example.com', 22); ssh2_auth_password($connection, 'username', 'password'); // Create SFTP session $sftp = ssh2_sftp($connection); $sftpStream = fopen('ssh2.sftp://'.$sftp.$dest, 'w'); try { if (!$sftpStream) { throw new Exception("Could not open remote file: $dest&lt;br&gt;"); } $data_to_send = file_get_contents($src); if ($data_to_send === false) { throw new Exception("Could not open local file: $src.&lt;br&gt;"); } if (fwrite($sftpStream, $data_to_send) === false) { throw new Exception("Could not send data from file: $src.&lt;br&gt;"); } else { //Upload was successful, post-upload actions go here... } fclose($sftpStream); } catch (Exception $e) { //error_log('Exception: ' . $e-&gt;getMessage()); echo 'Exception: ' . $e-&gt;getMessage(); if($sftpStream) {fclose($sftpStream);} } </code></pre> <p>This were the error messages I got:</p> <blockquote> <p>Warning: fopen() [function.fopen]: URL file-access is disabled in the server configuration in /path_to_script/sftp-test.php on line 17</p> <p>Warning: fopen(ssh2.sftp://Resource id</p> <h1>3/destination_directory_on_server/test.csv)</h1> <p>[function.fopen]: failed to open stream: no suitable wrapper could be found in /path_to_script/sftp-test.php on line 17 Exception: Could not open remote file: /destination_directory_on_server/test.csv</p> </blockquote> </div>

在windows上用ssh连接不上虚拟机中的linux

该做的都做了,但还是连接不上,心好累 Linux的ssh服务在运行中![图片说明](https://img-ask.csdn.net/upload/201805/19/1526698952_277557.png) Linux中防火墙也关了![图片说明](https://img-ask.csdn.net/upload/201805/19/1526699039_600722.png) (我用的Linux系统是Redhat 7.0) 配置文件也改了![图片说明](https://img-ask.csdn.net/upload/201805/19/1526699376_746699.png) 但还是连接不上![图片说明](https://img-ask.csdn.net/upload/201805/19/1526699426_378493.png) ![图片说明](https://img-ask.csdn.net/upload/201805/19/1526699440_663559.png) 希望各位大神能帮我找出问题,不胜感激

tensorflow-gpu Failed to get convolution algorithm.

成功安装了gpu版的tensorflow之后,尝试跑两个神经网 第一个:全连接的DNN 关键代码如下: ``` xs=tf.placeholder(tf.float32,[None,10]) ys=tf.placeholder(tf.float32,[None,7]) 'layer1:ful connect' W_fc1=weight_variable([10,5000],name_data=None) b_fc1=bias_variable([5000],name_data=None) h_fc1=tf.nn.relu(tf.matmul(xs,W_fc1)+b_fc1) 'layer2:ful connect' W_fc2=weight_variable([5000,5000],name_data=None) b_fc2=bias_variable([5000],name_data=None) h_fc2=tf.nn.relu(tf.matmul(h_fc1,W_fc2)+b_fc2) 'layer3:ful connect' W_fc3=weight_variable([5000,5000],name_data=None) b_fc3=bias_variable([5000],name_data=None) h_fc3=tf.nn.relu(tf.matmul(h_fc2,W_fc3)+b_fc3) 'output layer::ful connect,maxsoft' W_fc4=weight_variable([5000,7],name_data=None) b_fc4=bias_variable([7],name_data=None) output=tf.nn.sigmoid(tf.matmul(h_fc3,W_fc4)+b_fc4) ``` 能够顺利的利用gpu加速,确实比cpu的计算速度快不少。 然而,在跑cnn的时候(部分代码如下) ``` 'def weights' def weight_variable(shape,name_data): initial=tf.truncated_normal(shape,stddev=0.1) return tf.Variable(initial,dtype=tf.float32,name=name_data) 'def biases' def bias_variable(shape,name_data): initial=tf.constant(0.1,shape=shape) return tf.Variable(initial,dtype=tf.float32,name=name_data) 'def conv2d layer' def conv2d(x,W): return tf.nn.conv2d(x,W,strides=[1,1,1,1],padding='SAME') 'def pooling layer as max_pool' def max_pool_2x2_v(x): return tf.nn.max_pool(x,ksize=[1,2,2,1],strides=[1,2,2,1],padding='VALID') 'def pooling layer as max_pool' def max_pool_2x2_s(x): return tf.nn.max_pool(x,ksize=[1,2,2,1],strides=[1,1,1,1],padding='SAME') #input layer 'placeholder xs & ys' xs=tf.placeholder(tf.float32,[None,64]) ys=tf.placeholder(tf.float32,[None,1]) 'reshape the xs as x_image,which shape is 10*10' x_image=tf.reshape(xs,[-1,8,8,1]) print('red input::',x_image) #layer2:conv layer 2 patches 'patch1' W_conv_r_1_1=weight_variable([3,3,1,20],name_data='W_conv_r_1_1') b_conv_r_1_1=bias_variable([20],name_data='b_conv_r_1_1') h_conv_r_1_1=tf.nn.relu6(conv2d(x_image,W_conv_r_1_1)+b_conv_r_1_1) 'patch2' W_conv_r_1_2=weight_variable([3,3,1,10],name_data='W_conv_r_1_2') b_conv_r_1_2=bias_variable([10],name_data='b_conv_r_1_2') h_conv_r_1_2=tf.nn.relu6(conv2d(x_image,W_conv_r_1_2)+b_conv_r_1_2) 'concat to layer2' h_conv_r_1=tf.concat([h_conv_r_1_1,h_conv_r_1_2],3) print("red layer2::",h_conv_r_1) #layer3:conv layer:1 patch add with h_conv_r_1_2 'patch1' W_conv_r_2_1=weight_variable([5,5,30,30],name_data='W_conv_r_2_1') b_conv_r_2_1=bias_variable([30],name_data='b_conv_r_2_1') h_conv_r_2_1=tf.nn.elu(conv2d(h_conv_r_1,W_conv_r_2_1)+b_conv_r_2_1) 'patch for next layer' W_conv_r_2_2=weight_variable([5,5,30,15],name_data='W_conv_r_2_2') b_conv_r_2_2=bias_variable([15],name_data='b_conv_r_2_2') h_conv_r_2_2=tf.nn.elu(conv2d(h_conv_r_1,W_conv_r_2_2)+b_conv_r_2_2) 'concat for layer3' h_conv_r_2=tf.concat([h_conv_r_2_1,h_conv_r_1_2],3) print('red layer3;:',h_conv_r_2) ``` 上述代码是一个利用cnn训练黑白棋的程序,可以在CPU环境下顺利的运行,但是在gpu环境下,运行时会报错:Failed to get convolution algorithm (无法获得卷积算法) 完整的报错信息如下: ``` Traceback (most recent call last): File "C:\Users\fengg\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\client\session.py", line 1334, in _do_call return fn(*args) File "C:\Users\fengg\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\client\session.py", line 1319, in _run_fn options, feed_dict, fetch_list, target_list, run_metadata) File "C:\Users\fengg\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\client\session.py", line 1407, in _call_tf_sessionrun run_metadata) tensorflow.python.framework.errors_impl.UnknownError: Failed to get convolution algorithm. This is probably because cuDNN failed to initialize, so try looking to see if a warning log message was printed above. [[{{node Conv2D}} = Conv2D[T=DT_FLOAT, data_format="NHWC", dilations=[1, 1, 1, 1], padding="SAME", strides=[1, 1, 1, 1], use_cudnn_on_gpu=true, _device="/job:localhost/replica:0/task:0/device:GPU:0"](Reshape, W_conv_r_1_1/read)]] [[{{node Sigmoid/_75}} = _Recv[client_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device_incarnation=1, tensor_name="edge_105_Sigmoid", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:CPU:0"]()]] During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\fengg\Desktop\Othello with ResNet 3\Othello with ResNet-large\Othello with ResNet-large\train_ResNet.py", line 326, in <module> try_point=sess.run(prediction_r, feed_dict={xs:board_try,ys:[[0.0001]]}) File "C:\Users\fengg\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\client\session.py", line 929, in run run_metadata_ptr) File "C:\Users\fengg\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\client\session.py", line 1152, in _run feed_dict_tensor, options, run_metadata) File "C:\Users\fengg\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\client\session.py", line 1328, in _do_run run_metadata) File "C:\Users\fengg\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\client\session.py", line 1348, in _do_call raise type(e)(node_def, op, message) tensorflow.python.framework.errors_impl.UnknownError: Failed to get convolution algorithm. This is probably because cuDNN failed to initialize, so try looking to see if a warning log message was printed above. [[node Conv2D (defined at C:\Users\fengg\Desktop\Othello with ResNet 3\Othello with ResNet-large\Othello with ResNet-large\train_ResNet.py:31) = Conv2D[T=DT_FLOAT, data_format="NHWC", dilations=[1, 1, 1, 1], padding="SAME", strides=[1, 1, 1, 1], use_cudnn_on_gpu=true, _device="/job:localhost/replica:0/task:0/device:GPU:0"](Reshape, W_conv_r_1_1/read)]] [[{{node Sigmoid/_75}} = _Recv[client_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device_incarnation=1, tensor_name="edge_105_Sigmoid", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:CPU:0"]()]] Caused by op 'Conv2D', defined at: File "<string>", line 1, in <module> File "C:\Users\fengg\AppData\Local\Programs\Python\Python35\lib\idlelib\run.py", line 130, in main ret = method(*args, **kwargs) File "C:\Users\fengg\AppData\Local\Programs\Python\Python35\lib\idlelib\run.py", line 357, in runcode exec(code, self.locals) File "C:\Users\fengg\Desktop\Othello with ResNet 3\Othello with ResNet-large\Othello with ResNet-large\train_ResNet.py", line 57, in <module> h_conv_r_1_1=tf.nn.relu6(conv2d(x_image,W_conv_r_1_1)+b_conv_r_1_1) File "C:\Users\fengg\Desktop\Othello with ResNet 3\Othello with ResNet-large\Othello with ResNet-large\train_ResNet.py", line 31, in conv2d return tf.nn.conv2d(x,W,strides=[1,1,1,1],padding='SAME') File "C:\Users\fengg\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\ops\gen_nn_ops.py", line 1044, in conv2d data_format=data_format, dilations=dilations, name=name) File "C:\Users\fengg\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 787, in _apply_op_helper op_def=op_def) File "C:\Users\fengg\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\util\deprecation.py", line 488, in new_func return func(*args, **kwargs) File "C:\Users\fengg\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\framework\ops.py", line 3274, in create_op op_def=op_def) File "C:\Users\fengg\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\framework\ops.py", line 1770, in __init__ self._traceback = tf_stack.extract_stack() UnknownError (see above for traceback): Failed to get convolution algorithm. This is probably because cuDNN failed to initialize, so try looking to see if a warning log message was printed above. [[node Conv2D (defined at C:\Users\fengg\Desktop\Othello with ResNet 3\Othello with ResNet-large\Othello with ResNet-large\train_ResNet.py:31) = Conv2D[T=DT_FLOAT, data_format="NHWC", dilations=[1, 1, 1, 1], padding="SAME", strides=[1, 1, 1, 1], use_cudnn_on_gpu=true, _device="/job:localhost/replica:0/task:0/device:GPU:0"](Reshape, W_conv_r_1_1/read)]] [[{{node Sigmoid/_75}} = _Recv[client_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device_incarnation=1, tensor_name="edge_105_Sigmoid", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:CPU:0"]()]] ``` 请问这个问题该如何解决,谢谢了!

c# Tamir.SharpSsh连接sftp 使用方法Connect()

c#使用Tamir.SharpSSH.dll上传文件到sftp,平常都能正常运行,偶尔会出现调用 Connect()方法的时候停掉,不抛出任何的异常,一直停在这里。这样导致我的线程 也一直停在这里。然后把程序重新启动后又可以正常连接了。哪位遇到过这种现象?

配置rclone以支持diffie-hellman-group-exchange-sha256 diffie-hellman-group-exchange-sha1

<div class="post-text" itemprop="text"> <p>Some quick background. I use <code>rclone</code> to transfer data to a SFTP server. rclone is written in Golang and uses lib <code>crypto</code> under the hood. When we try to establish ssh connection to SFTP server, we get the error message </p> <blockquote> <p>couldn't connect SSH: ssh: handshake failed: ssh: no common algorithm for key exchange; client offered: [curve25519-sha256@libssh.org ecdh-sha2-nistp256 ecdh-sha2-nistp384 ecdh-sha2-nistp521 diffie-hellman-group14-sha1 diffie-hellman-group1-sha1], server offered: [diffie-hellman-group-exchange-sha256 diffie-hellman-group-exchange-sha1].</p> </blockquote> <p><code>crypto</code> lib has added the support for <code>diffie-hellman-group-exchange-sha256 diffie-hellman-group-exchange-sha1</code> around 3 weeks ago, but needs to be opt-in. (See <a href="https://github.com/golang/crypto/commit/57b3e21c3d5606066a87e63cfe07ec6b9f0db000" rel="nofollow noreferrer">https://github.com/golang/crypto/commit/57b3e21c3d5606066a87e63cfe07ec6b9f0db000</a>)</p> <p>Obviously, the latest rclone version hasn’t opt-in those algorithms support yet. So the question is: Anyone know how to config rclone to opt-in algorithm support for <code>diffie-hellman-group-exchange-sha256 diffie-hellman-group-exchange-sha1</code></p> </div>

mac上用ssh Permission denied (publickey,password)

日志打印如下 OpenSSH_7.3p1, LibreSSL 2.4.1 debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 20: Applying options for * debug1: Connecting to 10.211.55.18 [10.211.55.18] port 22. debug1: Connection established. debug1: identity file /Users/Sebastian/.ssh/id_rsa type 1 debug1: key_load_public: No such file or directory debug1: identity file /Users/Sebastian/.ssh/id_rsa-cert type -1 debug1: key_load_public: No such file or directory debug1: identity file /Users/Sebastian/.ssh/id_dsa type -1 debug1: key_load_public: No such file or directory debug1: identity file /Users/Sebastian/.ssh/id_dsa-cert type -1 debug1: key_load_public: No such file or directory debug1: identity file /Users/Sebastian/.ssh/id_ecdsa type -1 debug1: key_load_public: No such file or directory debug1: identity file /Users/Sebastian/.ssh/id_ecdsa-cert type -1 debug1: key_load_public: No such file or directory debug1: identity file /Users/Sebastian/.ssh/id_ed25519 type -1 debug1: key_load_public: No such file or directory debug1: identity file /Users/Sebastian/.ssh/id_ed25519-cert type -1 debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_7.3 debug1: Remote protocol version 2.0, remote software version OpenSSH_7.2p2 Ubuntu-4ubuntu2.1 debug1: match: OpenSSH_7.2p2 Ubuntu-4ubuntu2.1 pat OpenSSH* compat 0x04000000 debug1: Authenticating to 10.211.55.18:22 as 'Sebastian' debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: algorithm: curve25519-sha256@libssh.org debug1: kex: host key algorithm: ecdsa-sha2-nistp256 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: ecdsa-sha2-nistp256 SHA256:v5nU1rPqA5E3j5krl8M2xnFco/14XvBqetfcP6qfTtE debug1: Host '10.211.55.18' is known and matches the ECDSA host key. debug1: Found key in /Users/Sebastian/.ssh/known_hosts:2 debug1: rekey after 134217728 blocks debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: rekey after 134217728 blocks debug1: SSH2_MSG_NEWKEYS received debug1: SSH2_MSG_EXT_INFO received debug1: kex_input_ext_info: server-sig-algs=<rsa-sha2-256,rsa-sha2-512> debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: publickey,password debug1: Next authentication method: publickey debug1: Offering RSA public key: /Users/Sebastian/.ssh/id_rsa debug1: Authentications that can continue: publickey,password debug1: Trying private key: /Users/Sebastian/.ssh/id_dsa debug1: Trying private key: /Users/Sebastian/.ssh/id_ecdsa debug1: Trying private key: /Users/Sebastian/.ssh/id_ed25519 debug1: Next authentication method: password Sebastian@10.211.55.18's password: debug1: Authentications that can continue: publickey,password Permission denied, please try again. Sebastian@10.211.55.18's password: debug1: Authentications that can continue: publickey,password Permission denied, please try again. Sebastian@10.211.55.18's password: debug1: Authentications that can continue: publickey,password debug1: No more authentication methods to try. Permission denied (publickey,password). 在网上各种方法都试过啦 请问我该如何解决这一问题

git执行ssh -v git@github.com一直是permission denied.

git执行ssh -v git@github.com一直是permission denied. OpenSSH_7.2p2 Ubuntu-4ubuntu1, OpenSSL 1.0.2g-fips 1 Mar 2016 debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 19: Applying options for * debug1: Connecting to github.com [192.30.253.113] port 22. debug1: Connection established. debug1: identity file /home/johnnyding/.ssh/id_rsa type 1 debug1: key_load_public: No such file or directory debug1: identity file /home/johnnyding/.ssh/id_rsa-cert type -1 debug1: key_load_public: No such file or directory debug1: identity file /home/johnnyding/.ssh/id_dsa type -1 debug1: key_load_public: No such file or directory debug1: identity file /home/johnnyding/.ssh/id_dsa-cert type -1 debug1: key_load_public: No such file or directory debug1: identity file /home/johnnyding/.ssh/id_ecdsa type -1 debug1: key_load_public: No such file or directory debug1: identity file /home/johnnyding/.ssh/id_ecdsa-cert type -1 debug1: key_load_public: No such file or directory debug1: identity file /home/johnnyding/.ssh/id_ed25519 type -1 debug1: key_load_public: No such file or directory debug1: identity file /home/johnnyding/.ssh/id_ed25519-cert type -1 debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu1 debug1: Remote protocol version 2.0, remote software version libssh-0.7.0 debug1: no match: libssh-0.7.0 debug1: Authenticating to github.com:22 as 'git' debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: algorithm: curve25519-sha256@libssh.org debug1: kex: host key algorithm: ssh-rsa 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:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8 debug1: Host 'github.com' is known and matches the RSA host key. debug1: Found key in /home/johnnyding/.ssh/known_hosts:1 debug1: rekey after 134217728 blocks debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: rekey after 134217728 blocks debug1: SSH2_MSG_NEWKEYS received debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: publickey debug1: Next authentication method: publickey debug1: Offering RSA public key: /home/johnnyding/.ssh/id_rsa debug1: Authentications that can continue: publickey debug1: Trying private key: /home/johnnyding/.ssh/id_dsa debug1: Trying private key: /home/johnnyding/.ssh/id_ecdsa debug1: Trying private key: /home/johnnyding/.ssh/id_ed25519 debug1: No more authentication methods to try. Permission denied (publickey).

用java实现SFTP server

怎么用java实现sftp server端,网上有 用mina.apache 来实现的 但是找不到对应的jar,求代码。 不是利用sftp服务上传和下载的代码

用oss上传本地文件提示路径错误

本人小白 请各位大神指教一下 我在vs里面连接oss然后上传本地文件为什么会一直提示路径错误呀 ![图片说明](https://img-ask.csdn.net/upload/202002/11/1581405964_688665.jpg) ``` using System; using System.IO; using System.Threading; using Aliyun.OSS.Common; using System.Text; using Aliyun.OSS.Util; using System.Security.Cryptography; namespace Aliyun.OSS.Samples { /// <summary> /// Sample for putting object. /// </summary> public static class PutObjectSample { static string accessKeyId = "*** "; static string accessKeySecret = "*** "; static string endpoint = "*** "; static OssClient client = new OssClient(endpoint, accessKeyId, accessKeySecret); static string fileToUpload = "‪D:\\abc\\1.txt"; static AutoResetEvent _event = new AutoResetEvent(false); static HashAlgorithm hashAlgorithm = new MD5CryptoServiceProvider(); /// <summary> /// sample for put object to oss /// </summary> public static void PutObject(string bucketName) { PutObjectFromFile(bucketName); } public static void PutObjectFromFile(string bucketName) { const string key = "PutObjectFromFile"; try { client.PutObject(bucketName, key, fileToUpload); Console.WriteLine("Put object:{0} succeeded", key); } catch (OssException ex) { Console.WriteLine("Failed with error code: {0}; Error info: {1}. \nRequestID:{2}\tHostID:{3}", ex.ErrorCode, ex.Message, ex.RequestId, ex.HostId); } catch (Exception ex) { Console.WriteLine("Failed with error info: {0}", ex.Message); } } } } ```

OpenSSl生成证书,用rsa生成ca证书,接着用dsa生成server或client证书时出错

RSA: CA:1.openssl genrsa -out ca-key.pem 1024 2.openssl req -new -out ca-req.csr -key ca-key.pem -config openssl.cnf 3.openssl x509 -req -in ca-req.csr -out ca-cert.pem -signkey ca-key.pem -days 365 4.openssl pkcs12 -export -clcerts -in ca-cert.pem -inkey ca-key.pem -out ca.p12 -passout pass:123456 SERVER:1.openssl genrsa -out server-key.pem 1024 2.openssl req -new -out server-req.csr -key server-key.pem -config openssl.cnf 3.openssl x509 -req -in server-req.csr -out server-cert.pem -signkey server-key.pem -CA ../ca/ca-cert.pem -CAkey ../ca/ca-key.pem -CAcreateserial -days 365 4.openssl pkcs12 -export -clcerts -in server-cert.pem -inkey server-key.pem -out server.p12 -passout pass:123456 CLIENT:1.openssl genrsa -out client-key.pem 1024 2.openssl req -new -out client-req.csr -key client-key.pem -config openssl.cnf 3.openssl x509 -req -in client-req.csr -out client-cert.pem -signkey client-key.pem -CA ../ca/ca-cert.pem -CAkey ../ca/ca-key.pem -CAcreateserial -days 365 -sigalg SHA1withRSA 4.openssl pkcs12 -export -clcerts -in client-cert.pem -inkey client-key.pem -out client.p12 -passout pass:123456 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// DSA: CA:1.openssl dsaparam -out dsaparam 1024 2.openssl gendsa -out ca-key.pem dsaparam ////////////剩下的命令和生成rsa证书从第二部开始一样!!!!!!!!!!!!!!! 测试1:ca:DSA server:RSA client:RSA //执行通过 测试2:ca:DSA server:RSA client:DSA //执行通过 测试3:ca:DSA server:DSA client: RSA //执行通过 测试4:ca:DSA server:DSA client: DSA //执行通过 测试5:ca:RSA server:RSA client:RSA //执行通过 测试6:ca:RSA server:RSA client:DSA//第三步未通过 测试5:ca:RSA server:DSA client:RSA //第二部未通过 问题://生成RSA的ca,为什么在生成server或者client时,执行都在生成DSA证书,执行“3.”命令时出错!!!! 测试5:ca:RSA server:DSA client:DSA //未通过 问题://生成RSA的ca,为什么在生成server或者client时,执行都在生成DSA证书,执行“3.”命令时出错!!!! 问题://生成RSA的ca,为什么在生成server或者client时,执行都在生成DSA证书,执行“3.”命令时出错!!!! 问题://生成RSA的ca,为什么在生成server或者client时,执行都在生成DSA证书,执行“3.”命令时出错!!!!

用tensorflow跑卷积网络报错:InternalError (see above for traceback): cudnn PoolForward launch failed

![图片说明](https://img-ask.csdn.net/upload/201811/23/1542943238_331743.jpg) 用tf跑一个卷积神经网络时报错! 我查看了很多关于报该类型的错误文档,大多都说是因为tensorflow是一个很贪心的框架,总是试图为自己分配全部的GPU资源,但实际上GPU资源不可能完全一点不被其他程序占用,导致初始化失败。解决的办法都是再创建session时加上配置参数: gpu_options = tf.GPUOptions(per_process_gpu_memory_fraction=0.333) sess = Session(config=tf.ConfigProto(gpu_options=gpu_options)) 还有许多其他的参数,我都试了,但还是报了相同的错误,心里苦,跪求各位dalao!

vs2015 为何我加了include<algorithm> 还是无法使用sort函数

![图片说明](https://img-ask.csdn.net/upload/201711/10/1510315548_750541.png) 如图示,提升sort未定义标识符

Brute-force Algorithm

Problem Description Professor Brute is not good at algorithm design. Once he was asked to solve a path finding problem. He worked on it for several days and finally came up with the following algorithm: ![](http://acm.hdu.edu.cn/data/images/3221-1.jpg) Any fool but Brute knows that the function “funny” will be called too many times. Brute wants to investigate the number of times the function will be called, but he is too lazy to do it. Now your task is to calculate how many times the function “funny” will be called, for the given a, b and n. Because the answer may be too large, you should output the answer module by P. Input There are multiple test cases. The first line of the input contains an integer T, meaning the number of the test cases. For each test cases, there are four integers a, b, P and n in a single line. You can assume that 1≤n≤1000000000, 1≤P≤1000000, 0≤a, b<1000000. Output For each test case, output the answer with case number in a single line. Sample Input 3 3 4 10 3 4 5 13 5 3 2 19 100 Sample Output Case #1: 2 Case #2: 11 Case #3: 12

在中国程序员是青春饭吗?

今年,我也32了 ,为了不给大家误导,咨询了猎头、圈内好友,以及年过35岁的几位老程序员……舍了老脸去揭人家伤疤……希望能给大家以帮助,记得帮我点赞哦。 目录: 你以为的人生 一次又一次的伤害 猎头界的真相 如何应对互联网行业的「中年危机」 一、你以为的人生 刚入行时,拿着傲人的工资,想着好好干,以为我们的人生是这样的: 等真到了那一天,你会发现,你的人生很可能是这样的: ...

程序员请照顾好自己,周末病魔差点一套带走我。

程序员在一个周末的时间,得了重病,差点当场去世,还好及时挽救回来了。

和黑客斗争的 6 天!

互联网公司工作,很难避免不和黑客们打交道,我呆过的两家互联网公司,几乎每月每天每分钟都有黑客在公司网站上扫描。有的是寻找 Sql 注入的缺口,有的是寻找线上服务器可能存在的漏洞,大部分都...

点沙成金:英特尔芯片制造全过程揭密

“亚马逊丛林里的蝴蝶扇动几下翅膀就可能引起两周后美国德州的一次飓风……” 这句人人皆知的话最初用来描述非线性系统中微小参数的变化所引起的系统极大变化。 而在更长的时间尺度内,我们所生活的这个世界就是这样一个异常复杂的非线性系统…… 水泥、穹顶、透视——关于时间与技艺的蝴蝶效应 公元前3000年,古埃及人将尼罗河中挖出的泥浆与纳特龙盐湖中的矿物盐混合,再掺入煅烧石灰石制成的石灰,由此得来了人...

上班一个月,后悔当初着急入职的选择了

最近有个老铁,告诉我说,上班一个月,后悔当初着急入职现在公司了。他之前在美图做手机研发,今年美图那边今年也有一波组织优化调整,他是其中一个,在协商离职后,当时捉急找工作上班,因为有房贷供着,不能没有收入来源。所以匆忙选了一家公司,实际上是一个大型外包公司,主要派遣给其他手机厂商做外包项目。**当时承诺待遇还不错,所以就立马入职去上班了。但是后面入职后,发现薪酬待遇这块并不是HR所说那样,那个HR自...

女程序员,为什么比男程序员少???

昨天看到一档综艺节目,讨论了两个话题:(1)中国学生的数学成绩,平均下来看,会比国外好?为什么?(2)男生的数学成绩,平均下来看,会比女生好?为什么?同时,我又联想到了一个技术圈经常讨...

副业收入是我做程序媛的3倍,工作外的B面人生是怎样的?

提到“程序员”,多数人脑海里首先想到的大约是:为人木讷、薪水超高、工作枯燥…… 然而,当离开工作岗位,撕去层层标签,脱下“程序员”这身外套,有的人生动又有趣,马上展现出了完全不同的A/B面人生! 不论是简单的爱好,还是正经的副业,他们都干得同样出色。偶尔,还能和程序员的特质结合,产生奇妙的“化学反应”。 @Charlotte:平日素颜示人,周末美妆博主 大家都以为程序媛也个个不修边幅,但我们也许...

如果你是老板,你会不会踢了这样的员工?

有个好朋友ZS,是技术总监,昨天问我:“有一个老下属,跟了我很多年,做事勤勤恳恳,主动性也很好。但随着公司的发展,他的进步速度,跟不上团队的步伐了,有点...

我入职阿里后,才知道原来简历这么写

私下里,有不少读者问我:“二哥,如何才能写出一份专业的技术简历呢?我总感觉自己写的简历太烂了,所以投了无数份,都石沉大海了。”说实话,我自己好多年没有写过简历了,但我认识的一个同行,他在阿里,给我说了一些他当年写简历的方法论,我感觉太牛逼了,实在是忍不住,就分享了出来,希望能够帮助到你。 01、简历的本质 作为简历的撰写者,你必须要搞清楚一点,简历的本质是什么,它就是为了来销售你的价值主张的。往深...

外包程序员的幸福生活

今天给你们讲述一个外包程序员的幸福生活。男主是Z哥,不是在外包公司上班的那种,是一名自由职业者,接外包项目自己干。接下来讲的都是真人真事。 先给大家介绍一下男主,Z哥,老程序员,是我十多年前的老同事,技术大牛,当过CTO,也创过业。因为我俩都爱好喝酒、踢球,再加上住的距离不算远,所以一直也断断续续的联系着,我对Z哥的状况也有大概了解。 Z哥几年前创业失败,后来他开始干起了外包,利用自己的技术能...

C++11:一些微小的变化(新的数据类型、template表达式内的空格、nullptr、std::nullptr_t)

本文介绍一些C++的两个新特性,它们虽然微小,但对你的编程十分重要 一、Template表达式内的空格 C++11标准之前建议在“在两个template表达式的闭符之间放一个空格”的要求已经过时了 例如: vector&lt;list&lt;int&gt; &gt;; //C++11之前 vector&lt;list&lt;int&gt;&gt;; //C++11 二、nullptr ...

优雅的替换if-else语句

场景 日常开发,if-else语句写的不少吧??当逻辑分支非常多的时候,if-else套了一层又一层,虽然业务功能倒是实现了,但是看起来是真的很不优雅,尤其是对于我这种有强迫症的程序"猿",看到这么多if-else,脑袋瓜子就嗡嗡的,总想着解锁新姿势:干掉过多的if-else!!!本文将介绍三板斧手段: 优先判断条件,条件不满足的,逻辑及时中断返回; 采用策略模式+工厂模式; 结合注解,锦...

深入剖析Springboot启动原理的底层源码,再也不怕面试官问了!

大家现在应该都对Springboot很熟悉,但是你对他的启动原理了解吗?

离职半年了,老东家又发 offer,回不回?

有小伙伴问松哥这个问题,他在上海某公司,在离职了几个月后,前公司的领导联系到他,希望他能够返聘回去,他很纠结要不要回去? 俗话说好马不吃回头草,但是这个小伙伴既然感到纠结了,我觉得至少说明了两个问题:1.曾经的公司还不错;2.现在的日子也不是很如意。否则应该就不会纠结了。 老实说,松哥之前也有过类似的经历,今天就来和小伙伴们聊聊回头草到底吃不吃。 首先一个基本观点,就是离职了也没必要和老东家弄的苦...

为什么你不想学习?只想玩?人是如何一步一步废掉的

不知道是不是只有我这样子,还是你们也有过类似的经历。 上学的时候总有很多光辉历史,学年名列前茅,或者单科目大佬,但是虽然慢慢地长大了,你开始懈怠了,开始废掉了。。。 什么?你说不知道具体的情况是怎么样的? 我来告诉你: 你常常潜意识里或者心理觉得,自己真正的生活或者奋斗还没有开始。总是幻想着自己还拥有大把时间,还有无限的可能,自己还能逆风翻盘,只不是自己还没开始罢了,自己以后肯定会变得特别厉害...

为什么程序员做外包会被瞧不起?

二哥,有个事想询问下您的意见,您觉得应届生值得去外包吗?公司虽然挺大的,中xx,但待遇感觉挺低,马上要报到,挺纠结的。

当HR压你价,说你只值7K,你该怎么回答?

当HR压你价,说你只值7K时,你可以流畅地回答,记住,是流畅,不能犹豫。 礼貌地说:“7K是吗?了解了。嗯~其实我对贵司的面试官印象很好。只不过,现在我的手头上已经有一份11K的offer。来面试,主要也是自己对贵司挺有兴趣的,所以过来看看……”(未完) 这段话主要是陪HR互诈的同时,从公司兴趣,公司职员印象上,都给予对方正面的肯定,既能提升HR的好感度,又能让谈判气氛融洽,为后面的发挥留足空间。...

面试:第十六章:Java中级开发(16k)

HashMap底层实现原理,红黑树,B+树,B树的结构原理 Spring的AOP和IOC是什么?它们常见的使用场景有哪些?Spring事务,事务的属性,传播行为,数据库隔离级别 Spring和SpringMVC,MyBatis以及SpringBoot的注解分别有哪些?SpringMVC的工作原理,SpringBoot框架的优点,MyBatis框架的优点 SpringCould组件有哪些,他们...

面试阿里p7,被按在地上摩擦,鬼知道我经历了什么?

面试阿里p7被问到的问题(当时我只知道第一个):@Conditional是做什么的?@Conditional多个条件是什么逻辑关系?条件判断在什么时候执...

面试了一个 31 岁程序员,让我有所触动,30岁以上的程序员该何去何从?

最近面试了一个31岁8年经验的程序猿,让我有点感慨,大龄程序猿该何去何从。

【阿里P6面经】二本,curd两年,疯狂复习,拿下阿里offer

二本的读者,在老东家不断学习,最后逆袭

大三实习生,字节跳动面经分享,已拿Offer

说实话,自己的算法,我一个不会,太难了吧

程序员垃圾简历长什么样?

已经连续五年参加大厂校招、社招的技术面试工作,简历看的不下于万份 这篇文章会用实例告诉你,什么是差的程序员简历! 疫情快要结束了,各个公司也都开始春招了,作为即将红遍大江南北的新晋UP主,那当然要为小伙伴们做点事(手动狗头)。 就在公众号里公开征简历,义务帮大家看,并一一点评。《启舰:春招在即,义务帮大家看看简历吧》 一石激起千层浪,三天收到两百多封简历。 花光了两个星期的所有空闲时...

《经典算法案例》01-08:如何使用质数设计扫雷(Minesweeper)游戏

我们都玩过Windows操作系统中的经典游戏扫雷(Minesweeper),如果把质数当作一颗雷,那么,表格中红色的数字哪些是雷(质数)?您能找出多少个呢?文中用列表的方式罗列了10000以内的自然数、质数(素数),6的倍数等,方便大家观察质数的分布规律及特性,以便对算法求解有指导意义。另外,判断质数是初学算法,理解算法重要性的一个非常好的案例。

《Oracle Java SE编程自学与面试指南》最佳学习路线图(2020最新版)

正确选择比瞎努力更重要!

面试官:你连SSO都不懂,就别来面试了

大厂竟然要考我SSO,卧槽。

微软为一人收购一公司?破解索尼程序、写黑客小说,看他彪悍的程序人生!...

作者 | 伍杏玲出品 | CSDN(ID:CSDNnews)格子衬衫、常掉发、双肩包、修电脑、加班多……这些似乎成了大众给程序员的固定标签。近几年流行的“跨界风”开始刷新人们对程序员的...

终于,月薪过5万了!

来看几个问题想不想月薪超过5万?想不想进入公司架构组?想不想成为项目组的负责人?想不想成为spring的高手,超越99%的对手?那么本文内容是你必须要掌握的。本文主要详解bean的生命...

我说我懂多线程,面试官立马给我发了offer

不小心拿了几个offer,有点烦

自从喜欢上了B站这12个UP主,我越来越觉得自己是个废柴了!

不怕告诉你,我自从喜欢上了这12个UP主,哔哩哔哩成为了我手机上最耗电的软件,几乎每天都会看,可是吧,看的越多,我就越觉得自己是个废柴,唉,老天不公啊,不信你看看…… 间接性踌躇满志,持续性混吃等死,都是因为你们……但是,自己的学习力在慢慢变强,这是不容忽视的,推荐给你们! 都说B站是个宝,可是有人不会挖啊,没事,今天咱挖好的送你一箩筐,首先啊,我在B站上最喜欢看这个家伙的视频了,为啥 ,咱撇...

立即提问
相关内容推荐