ssh2_scp_send第一次没问题,但第二次失败了

I am making use of php ssh2_scp_send to transfer files to the remote machine, but it is a bit weird, it works for the first time but fails my second call with the following error

//success for file transfer
if (!(ssh2_scp_send($this->conn, $lpath, $rpath, 0777))){
            throw new Exception("File transfer failed!");
        }
        ssh2_exec($this->conn, 'exit'); 

//fail this time
if (!(ssh2_scp_send($this->conn, $lpath, $rpath, 0777))){
            throw new Exception("File transfer failed!");
        }
        ssh2_exec($this->conn, 'exit')

"Warning: ssh2_scp_send(): Failed copying file in /var/www/trunk/rsetting/class/ssh.class.php on line 57"

Any help will be appreciated~Thanks

doxqszx09742
doxqszx09742 是的,完全相同的错误
6 年多之前 回复
doulezhi5326
doulezhi5326 是同样的错误吗?
6 年多之前 回复
duanqiao1949
duanqiao1949 感谢您的评论,我删除了该代码,但问题仍然在这里:(
6 年多之前 回复
doubianyan9749
doubianyan9749 因为您在第一次转移后关闭了连接..ssh2_exec($this->conn,'exit');
6 年多之前 回复

2个回答



将php-ssh2扩展名更新为0.13就可以了。</ p>
</ div>

展开原文

原文

update php-ssh2 extension to 0.13 will be fine.



我有同样的问题但通过调用此函数解决了它:</ p>

ssh2_exec ($ conn,'exit'); </ code> </ p>

在循环结束时。
我认为此命令刷新缓冲区并正确写入最后一个远程文件。</ p >
</ div>

展开原文

原文

I had the same problem but solved it by calling this function:

ssh2_exec($conn, 'exit');

at the end of the loop. I think this command flush the buffer and write correctly the last remote file.

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
ssh2_scp_send - 将整个本地文件夹内容上载到远程文件夹

<div class="post-text" itemprop="text"> <p>I would like to use the ssh2_scp_send function to copy all the contents of a local folder to a folder on the remote computer.</p> <p>I tried to do the way it shows in the example of the link below, but from what I realized I only copy file to file. <a href="http://php.net/manual/pt_BR/function.ssh2-scp-send.php" rel="nofollow noreferrer">http://php.net/manual/pt_BR/function.ssh2-scp-send.php</a></p> <pre><code>&lt;?php $connection = ssh2_connect('shell.example.com', 22); ssh2_auth_password($connection, 'username', 'password'); ssh2_scp_send($connection, '/local/filename', '/remote/filename', 0644); ?&gt; </code></pre> <p>I thought I'd put this together with a function that lists all the files and subfolders in a parent folder.</p> <pre><code>function listFolderFiles($dir){ $ffs = scandir($dir); unset($ffs[array_search('.', $ffs, true)]); unset($ffs[array_search('..', $ffs, true)]); // prevent empty ordered elements if (count($ffs) &lt; 1) return; echo '&lt;ol&gt;'; foreach($ffs as $ff){ echo '&lt;li&gt;'.$ff; if(is_dir($dir.'/'.$ff)) listFolderFiles($dir.'/'.$ff); echo '&lt;/li&gt;'; } echo '&lt;/ol&gt;'; } listFolderFiles('Main Dir'); </code></pre> <p>Source: <a href="https://stackoverflow.com/a/7121809/8442925">https://stackoverflow.com/a/7121809/8442925</a></p> <p>How could I redo this function above and include the ssh2_scp_send part? Could you give me a north or another method?</p> </div>

有没有理由PHP ssh2_scp_send()函数不能在同一台机器上运行?

<div class="post-text" itemprop="text"> <p>I am trying to connect via ssh from php, and send a file. When the machines are different, it works. When I connect to the same machine, it doesn't work.</p> <pre><code>$this-&gt;conn = ssh2_connect($this-&gt;ci['host'],$this-&gt;ci['ssh_port']); ssh2_scp_send($this-&gt;conn,$ssh_source,$ssh_destination); </code></pre> <p>The connection $this-&gt;conn is valid in both cases. So is there any reasons why ssh2_scp_send() will not work when $this-&gt;conn connects to the same machine? When trying on the same machine I get: Warning: ssh2_scp_send(): Failure creating remote file: (null)</p> </div>

PHP + SSH如何修复:“错误:ssh2_connect():启动SSH连接时出错(-4):收到无效的MAC?”

<div class="post-text" itemprop="text"> <p>Working on a project that was built using ssh2_connect to download files from a server. The production server the project is running on works, but getting ssh2_connect to work on my Mac running OSX 10.8 is proving to be problematic.</p> <p>The following command:</p> <pre><code>ssh2_connect("myhost", 22); </code></pre> <p>Produces the following error:</p> <pre><code>Error: ssh2_connect(): Error starting up SSH connection(-4): Invalid MAC received </code></pre> <p>I can connect from the command line, so I know it isn't a system wide SSH issue. Does anyone know how to debug or solve this problem? Thanks in advance and may your children be blessed with large brains and social skills :)</p> <p>UPDATE: Solution posted below</p> </div>

致命错误:在第13行的C:\ Apache \ htdocs \ test \ testSsh2_03.php中调用未定义的函数ssh2_connect()

<div class="post-text" itemprop="text"> <p>Running PHP 5.6.5 I have installed "libssh2.dll" under c:\PHP I have installed "php_ssh2.dll" and "php_ssh2.pdb" in C:\PHP\ext in both flavours, 64 and 32, but none work. I have also tried "phpseclib", and I get another error. I have researched it on the web for a couple of days now and most of the solutions are old, none have worked for me.</p> <p>Here is the code:</p> <pre><code>&lt;?php // ================================================= // testscp_02.php // ================================================= $hostname = 'myconnection.com'; $username = 'my_userName'; $password = 'MyPassword'; $sourceFile = 'TestScp.php'; $targetFile = '/home/myDir/TestScp.php'; $connection = ssh2_connect($hostname, 22); echo '&lt;br&gt;[' . $connection . ']&lt;br&gt;'; ssh2_auth_password($connection, $username, $password) ssh2_scp_send($connection, 'C:/Apache/htdocs/test/testscp_02.php', '/home/myDir/TestScp.php', 0666); ?&gt; </code></pre> <p>I have tried many things, I cannot get PHP to see SSH2 as pointed out by some people that it should happens when I install the DLL as stated at the beginning of this post.</p> </div>

Linux ssh 连接问题 scp

[ruanzhen1@m01 ~]$ cat /etc/hosts 127.0.0.1 localhosts localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhosts localhost.localdomain localhost6 localhost6.localdomain6 172.16.1.5 lb01 172.16.1.6 lb02 172.16.1.7 web02 172.16.1.8 web01 172.16.1.51 db01 db01.etiantian.org 172.16.1.31 nfs01 172.16.1.41 backup 172.16.1.61 m01 [ruanzhen1@m01 ~]$ scp -P52112 hosts ruanzhen1@172.16.1.31:~ hosts: No such file or directory 改为[ruanzhen1@m01 ~]$ scp -P52112 ~/hosts ruanzhen1@172.16.1.31:~ 仍然是hosts: No such file or directory 怎么解决啊?

无法通过SFTP使用PHP,ssh2下载最新文件

<div class="post-text" itemprop="text"> <pre><code>#!/usr/bin/php &lt;?php $username = "backup"; $password = "xxxxxxx"; $url = '192.168.1.100'; // Make our connection $connection = ssh2_connect($url); // Authenticate if (!ssh2_auth_password($connection, $username, $password)) {echo('Unable to connect.');} // Create our SFTP resource if (!$sftp = ssh2_sftp($connection)) {echo ('Unable to create SFTP connection.');} $localDir = 'file:///home/hhh/Downloads/dbs'; $remoteDir = '/home/backup/Dropbox/dbs'; // download all the files $dir = ('ssh2.sftp://' . $sftp . $remoteDir); $numberOfFiles = 10; $pattern = '/\.(aes|AES)$/'; // check only file with these ext. $newstamp = 2; $newname = ""; if ($handle = opendir($dir)) { while (false !== ($fname = readdir($handle))) { // Eliminate current directory, parent directory if (preg_match('/^\.{1,2}$/',$fname)) continue; // Eliminate other pages not in pattern if (! preg_match($pattern,$fname)) continue; $timedat = filemtime("$dir/$fname"); $fils[$fname] = $timedat; if ($timedat &gt; $newstamp) { $newstamp = $timedat; $newname = $fname; } } } closedir ($handle); arsort ($fils, SORT_NUMERIC); sfor($i = 0; $i &lt; $numberOfFiles ; $i++) $fils2 = array_keys($fils); $i = 0; foreach($fils2 as $s){ $i++; echo "$i " . $s . "&lt;br&gt; "; if($i == $numberOfFiles )break; } // $newstamp is the time for the latest file // $newname is the name of the latest file // print last mod.file - format date as you like $rttp = ssh2_scp_recv($connection, "$remoteDir/$newname", "$localDir/$newname") ?&gt; </code></pre> <p>I have been trying to download the latest <strong>FILES</strong> from a directory using <strong>sftp</strong>. I have only managed to download ONE file instead to 10. I also was able to tweak it to download all the files but that is not i what I was after.</p> <p>I would like to make it work so that I can be able to download a certain X number of files. </p> </div>

带有SSH2的PHP CLI脚本终止,没有消息

<div class="post-text" itemprop="text"> <p>I have a long running PHP script that is synching two systems and using SSH2 to upload files to a Server. The script is executed using a cronjob. </p> <p>My problem is, that the script just terminates (sometimes after 1 hour, sometimes after two hours) without any output. I couldn't find anything in PHP's error logs, nor in the systemlogs. This happens equally on three separate machines. </p> <p>Basically this is my code (please imaging error handling etc. included) for the upload:</p> <pre><code>$oFtpStream = fopen('ssh2.sftp://' . $this-&gt;sUser . ':' . $this-&gt;sPassword . '@' .$this-&gt;sHost . ':' . $this-&gt;iPort . $psTargetFile, 'w'); $sFileContents = file_get_contents($psSourceFile); fwrite($oFtpStream, $sFileContents) === false) fclose($oFtpStream); ssh2_sftp_chmod($this-&gt;oFtpConn, $psTargetFile, 0777); </code></pre> <p>I would be really thankfull for any thoughts/ideas. </p> <p>Thanks in advance!</p> </div>

Go SSH服务器通过SCP接受文件传输

<div class="post-text" itemprop="text"> <p>I would like to create a server process with Go which can receive or send files via scp, like:</p> <pre><code>scp -P 2200 -i ssh/tester_rsa foo@localhost:/test output.txt </code></pre> <p>or</p> <pre><code>scp -P 2200 -i ssh/tester_rsa input.txt foo@localhost:/test </code></pre> <p>With help of <a href="https://gist.github.com/nictuku/2338048" rel="nofollow noreferrer">this gist</a> I was already able to create an interactive ssh server which is able to accpet connections/commands via</p> <pre><code>ssh -i ssh/tester_rsa foo@localhost -p 2200 'somecommand' </code></pre> <p>and works nicely.</p> <p>I understood that the payload contains "scp -f /test" for the first shown scp request. I am stuck in how to return actual content from the server, I tried in replying with a string (as with a normal ssh reply) but I get no file back.</p> <p>Here my output of scp -vv</p> <pre><code>... debug2: callback done debug2: channel 0: open confirm rwindow 2097152 rmax 32768 debug2: channel_input_status_confirm: type 99 id 0 debug2: exec request accepted on channel 0 debug1: client_input_channel_req: channel 0 rtype exit-status reply 0 debug2: channel 0: rcvd close debug2: channel 0: output open -&gt; drain debug2: channel 0: close_read ... </code></pre> <p>When I am trying with a propper server I get following lines</p> <pre><code>... debug2: exec request accepted on channel 0 debug2: channel 0: rcvd ext data 43 Sending file modes: C0644 98 output.txt debug2: channel 0: written 43 to efd 7 Sink: C0644 98 output.txt output.txt 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 debug2: channel 0: rcvd eow debug2: channel 0: close_read ... </code></pre> <p>So I guess I am missing some protocol / flow parameters or commands in Go.</p> <p>Only the snippet of Go Code, as project is huge and is not easy to copy and paste here:</p> <pre><code>func (a *Shell) handleExec(connection ssh.Channel, payload []byte) { ... for _, c := range a.ExecCmds { if matchCmds(str, c.Cmd) { connection.Write([]byte("Here comes the file content") } } ... </code></pre> <p>I know that the code is not right for scp, but it works fine for normal ssh. I don't know how to handle the connection, and what exactly to return so that a correct file transfer is done.</p> <p>Googling for a while led me to <a href="https://stackoverflow.com/questions/33846959/golang-ssh-server-how-to-handle-file-transfer-with-scp">this question on stack overflow</a> which is nearly the same but got not completely answered, as I am exactly looking for the part</p> <pre><code> runYourCommand(msg.Command, ch) </code></pre> <p>which I guess contains the logic :)</p> <p>Update: I am looking not for external ressources any more, I got some more input from <a href="http://www.programcreek.com/java-api-examples/index.php?class=com.jcraft.jsch.ChannelExec&amp;method=getOutputStream" rel="nofollow noreferrer">this java snippet</a></p> <p>It looks like they are emulating the scp protocol and I would perfectly be fine to have someone helping me to translate it to Go:</p> <pre><code> StringBuilder params = new StringBuilder("C0").append(perms); params.append(" ").append(data.length).append(" "); params.append(remoteFileName).append(" "); out.write(params.toString().getBytes()); out.flush(); if (!waitForInputStream(logger, in)) { cleanup(logger, out, channel); logger.log(Level.SEVERE, "Error before writing SCP bytes"); return UNKNOWN_ERROR; /* TODO: Improve */ } out.write(data); out.write(new byte[]{0}, 0, 1); out.flush(); </code></pre> <p>I tried this so far, but didn't help</p> <pre><code>o:="Some content of a faked file" connection.Write([]byte("C0644 "+string(len(o))+"test.txt ")) connection.Write([]byte(o)) connection.Write([]byte{0,0,1}) </code></pre> <p>To clarify: I would not like to serve a real file, rather then Go simulating a file delivery over scp (using a string as the content of the file).</p> <p>Thanks in advance!</p> </div>

如何使用我的ec2键scp与PHP

<div class="post-text" itemprop="text"> <p>I use a command like this on my Mac to scp to my remote server (in a .sh file—it must be done automatically). </p> <pre><code>scp -i my_key.pem index.html ubuntu@&lt;ip&gt;:~/public/index.html; </code></pre> <p>Now I have to do the same thing from a Windows machine and figured I would just write it in php instead of using bash so that the code is the same on Windows and Mac (our app runs a local server too that already uses php scripts, it's complicated). I've looked at a few examples but can't find my exact solution. Also, to be honest I don't know much about private/public keys and I want to be careful.</p> <p>I've got something like this. I don't know what to do for the key.</p> <pre><code>$hostname = '21.232.foo.bar'; $sourceFile = 'index.html'; $targetFile = '~/public/indexx.html'; // SSH Key File — I'm guessing this should be private, not public private $ssh_auth_priv = '~/.ec2/my_key.pem'; $connection = ssh2_connect($hostname, 22); ssh2_scp_send($connection, $sourceFile, $targetFile, 0777); </code></pre> <p>Also, if I'm trying to do something stupid and there is a much easier way, please let me know. Thanks for your help.</p> <p>~~ UPDATE</p> <p>My code now looks as follows and I'm getting an error Warning: ssh2_scp_send(): Failure creating remote file: failed to send file</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;title&gt;PHP Test&lt;/title&gt; &lt;/head&gt; &lt;body&gt; &lt;?php $hostname = '13.124.foo.bar'; $sourceFile = 'foo.txt'; $targetFile = '~/public2/foo.txt'; $connection = ssh2_connect($hostname, 22); ssh2_auth_pubkey_file( $connection, 'ubuntu', '~/.ec2/id_rsa.pub', '~/.ec2/bh.pem' ); ssh2_scp_send($connection, $sourceFile, $targetFile, 0644); ?&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>That's being hosted on my localhost:8000</p> </div>

SSH连接在重负载下失败

<div class="post-text" itemprop="text"> <pre><code>$con = ssh2_connect($host, 22); ssh2_auth_password($con, $rem_acc, $pass); ssh2_scp_send($con,$rand.".gz","./".$rand.".gz"); $stream = ssh2_exec($con, "./exeonserv.sh ".$rand); </code></pre> <p>As long as I keep the load to below 2 requests per second to the PHP script (there are 2 SSH connections in the script, so 4 connections per second), this works fine</p> <p>But the moment it exceeds 2 requests per second, the connection starts failing, with this error in the log:</p> <blockquote> <p>[Sat Apr 21 11:51:40 2012] [error] [client 172.16.57.97] PHP Warning: ssh2_connect(): Error starting up SSH connection(-1): Failed getting banner in /var/www/fsproj/result.php on line 105<br> [Sat Apr 21 11:51:40 2012] [error] [client 172.16.57.97] PHP Warning: ssh2_connect(): Unable to connect to localhost in /var/www/fsproj/result.php on line 105</p> </blockquote> <p>I used the following code to try and solve the issue, but if the sustained load is greater than 2req/sec. it just ends up increasing the response time</p> <pre><code>$con=false; while(!$con) { $con = ssh2_connect($host, 22); } </code></pre> <p>Is there a cap on the maximum rate at which SSH connections can be opened? If so where can I change that value? (or any other solutions?)</p> <p>I'm using Apache on Ubuntu</p> </div>

Mac 安装php Qconf扩展时报错

错误信息如下: Undefined symbols for architecture x86_64: "_gdbm_errno", referenced from: qconf_init_dbf_(int) in qconf_dump.cc.o qconf_dump_get(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&) in qconf_dump.cc.o qconf_dump_set(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in qconf_dump.cc.o qconf_dump_delete(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in qconf_dump.cc.o (maybe you meant: _gdbm_errno_location) "_libssh2_agent_connect", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_agent_disconnect", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_agent_free", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_agent_get_identity", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_agent_init", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_agent_list_identities", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_agent_userauth", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_channel_free", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_channel_read_ex", referenced from: _scp_recv in libcurl.a(libcurl_la-ssh.o) "_libssh2_channel_send_eof", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_channel_wait_closed", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_channel_wait_eof", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_channel_write_ex", referenced from: _scp_send in libcurl.a(libcurl_la-ssh.o) "_libssh2_hostkey_hash", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_knownhost_add", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_knownhost_check", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_knownhost_free", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_knownhost_init", referenced from: _ssh_connect in libcurl.a(libcurl_la-ssh.o) "_libssh2_knownhost_readfile", referenced from: _ssh_connect in libcurl.a(libcurl_la-ssh.o) "_libssh2_knownhost_writefile", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_scp_recv", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_scp_send64", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_session_block_directions", referenced from: _ssh_multi_statemach in libcurl.a(libcurl_la-ssh.o) _scp_recv in libcurl.a(libcurl_la-ssh.o) _scp_send in libcurl.a(libcurl_la-ssh.o) _sftp_recv in libcurl.a(libcurl_la-ssh.o) _sftp_send in libcurl.a(libcurl_la-ssh.o) _ssh_block_statemach in libcurl.a(libcurl_la-ssh.o) "_libssh2_session_disconnect_ex", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_session_free", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_session_hostkey", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_session_init_ex", referenced from: _ssh_connect in libcurl.a(libcurl_la-ssh.o) "_libssh2_session_last_errno", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_session_last_error", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_session_set_blocking", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_session_startup", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_sftp_close_handle", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_sftp_init", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_sftp_last_error", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_sftp_mkdir_ex", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_sftp_open_ex", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_sftp_read", referenced from: _sftp_recv in libcurl.a(libcurl_la-ssh.o) "_libssh2_sftp_readdir_ex", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_sftp_rename_ex", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_sftp_rmdir_ex", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_sftp_seek64", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_sftp_shutdown", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_sftp_stat_ex", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_sftp_symlink_ex", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_sftp_unlink_ex", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_sftp_write", referenced from: _sftp_send in libcurl.a(libcurl_la-ssh.o) "_libssh2_userauth_authenticated", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_userauth_keyboard_interactive_ex", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_userauth_list", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_userauth_password_ex", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_userauth_publickey_fromfile_ex", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [agent/qconf_agent] Error 1 make[1]: *** [agent/CMakeFiles/qconf_agent.dir/all] Error 2 make: *** [all] Error 2

Mac 安装PHP QConf扩展时报错,求指导。

错误提示如下: Undefined symbols for architecture x86_64: "_gdbm_errno", referenced from: qconf_init_dbf_(int) in qconf_dump.cc.o qconf_dump_get(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&) in qconf_dump.cc.o qconf_dump_set(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in qconf_dump.cc.o qconf_dump_delete(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in qconf_dump.cc.o (maybe you meant: _gdbm_errno_location) "_libssh2_agent_connect", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_agent_disconnect", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_agent_free", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_agent_get_identity", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_agent_init", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_agent_list_identities", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_agent_userauth", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_channel_free", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_channel_read_ex", referenced from: _scp_recv in libcurl.a(libcurl_la-ssh.o) "_libssh2_channel_send_eof", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_channel_wait_closed", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_channel_wait_eof", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_channel_write_ex", referenced from: _scp_send in libcurl.a(libcurl_la-ssh.o) "_libssh2_hostkey_hash", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_knownhost_add", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_knownhost_check", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_knownhost_free", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_knownhost_init", referenced from: _ssh_connect in libcurl.a(libcurl_la-ssh.o) "_libssh2_knownhost_readfile", referenced from: _ssh_connect in libcurl.a(libcurl_la-ssh.o) "_libssh2_knownhost_writefile", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_scp_recv", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_scp_send64", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_session_block_directions", referenced from: _ssh_multi_statemach in libcurl.a(libcurl_la-ssh.o) _scp_recv in libcurl.a(libcurl_la-ssh.o) _scp_send in libcurl.a(libcurl_la-ssh.o) _sftp_recv in libcurl.a(libcurl_la-ssh.o) _sftp_send in libcurl.a(libcurl_la-ssh.o) _ssh_block_statemach in libcurl.a(libcurl_la-ssh.o) "_libssh2_session_disconnect_ex", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_session_free", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_session_hostkey", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_session_init_ex", referenced from: _ssh_connect in libcurl.a(libcurl_la-ssh.o) "_libssh2_session_last_errno", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_session_last_error", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_session_set_blocking", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_session_startup", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_sftp_close_handle", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_sftp_init", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_sftp_last_error", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_sftp_mkdir_ex", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_sftp_open_ex", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_sftp_read", referenced from: _sftp_recv in libcurl.a(libcurl_la-ssh.o) "_libssh2_sftp_readdir_ex", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_sftp_rename_ex", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_sftp_rmdir_ex", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_sftp_seek64", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_sftp_shutdown", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_sftp_stat_ex", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_sftp_symlink_ex", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_sftp_unlink_ex", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_sftp_write", referenced from: _sftp_send in libcurl.a(libcurl_la-ssh.o) "_libssh2_userauth_authenticated", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_userauth_keyboard_interactive_ex", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_userauth_list", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_userauth_password_ex", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) "_libssh2_userauth_publickey_fromfile_ex", referenced from: _ssh_statemach_act in libcurl.a(libcurl_la-ssh.o) ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [agent/qconf_agent] Error 1 make[1]: *** [agent/CMakeFiles/qconf_agent.dir/all] Error 2 make: *** [all] Error 2

急!!libssh2_channel_read()无法返回全部数据

当执行的命令返回的结果数据量较大时,libssh2_channel_read()只能读取channel的一部分,不知道怎样才能读取全部的数据。 //下面是读取channel的代码 for( ;; ) { libssh2_channel_receive_window_adjust(channel, LIBSSH2_CHANNEL_MINADJUST*5, 1); int rc1; do { char buffer[0x4000]; rc1 = libssh2_channel_read( channel, buffer, sizeof(buffer) ); //读数据 count = count + rc1; //记录输出的字节数 if( rc1 > 0 ) { result = [NSString stringWithFormat:@"%s",buffer]; } } while( rc1 > 0 ); /* this is due to blocking that would occur otherwise so we loop on this condition */ if( rc1 == LIBSSH2_ERROR_EAGAIN ) { waitsocket(sock, session); } else break; } ------------------------------结果---------------------- 2014-10-17 10:28:30.747 WiFiset[645:60b] ================================ 28248 //本次读取字节数。(总字节数不止这个数) ========================================= 2014-10-17 10:28:30.748 WiFiset[645:60b] ----- ms ago Information elements from Probe Response frame: SSID: WiFi1111 Capabilities: 0x11ef (......中间省略......) TIM: DTIM Count 0 DTIM Period 2 Bitmap Control 0x0 Bitmap[0] 0x0 ERP: Barker_Preamble_Mode Extended supported rates //“rates”后面还有很多数据

ssh登陆“Permission denied ”是怎么回事?

ssh登陆服务器,输入密码后却一直不能登陆进去,输出的调试信息是: ``` wangxiaoxiaodeMacBook-Air:.ssh wangxiaoxiao$ ssh -v -p 1029 xxwang@115.156.164.251 OpenSSH_6.9p1, LibreSSL 2.1.8 debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 21: Applying options for * debug1: Connecting to 115.156.164.251 [115.156.164.251] port 1029. debug1: Connection established. debug1: identity file /Users/wangxiaoxiao/.ssh/id_rsa type 1 debug1: key_load_public: No such file or directory debug1: identity file /Users/wangxiaoxiao/.ssh/id_rsa-cert type -1 debug1: key_load_public: No such file or directory debug1: identity file /Users/wangxiaoxiao/.ssh/id_dsa type -1 debug1: key_load_public: No such file or directory debug1: identity file /Users/wangxiaoxiao/.ssh/id_dsa-cert type -1 debug1: key_load_public: No such file or directory debug1: identity file /Users/wangxiaoxiao/.ssh/id_ecdsa type -1 debug1: key_load_public: No such file or directory debug1: identity file /Users/wangxiaoxiao/.ssh/id_ecdsa-cert type -1 debug1: key_load_public: No such file or directory debug1: identity file /Users/wangxiaoxiao/.ssh/id_ed25519 type -1 debug1: key_load_public: No such file or directory debug1: identity file /Users/wangxiaoxiao/.ssh/id_ed25519-cert type -1 debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_6.9 debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.3 debug1: match: OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.3 pat OpenSSH_6.6.1* compat 0x04000000 debug1: Authenticating to 115.156.164.251:1029 as 'xxwang' debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: server->client chacha20-poly1305@openssh.com <implicit> none debug1: kex: client->server chacha20-poly1305@openssh.com <implicit> none debug1: expecting SSH2_MSG_KEX_ECDH_REPLY debug1: Server host key: ecdsa-sha2-nistp256 SHA256:hEan0tTVdOIgIhYZnv9cee++XRQXxts3RWehu5+cDis debug1: Host '[115.156.164.251]:1029' is known and matches the ECDSA host key. debug1: Found key in /Users/wangxiaoxiao/.ssh/known_hosts:1 debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug1: SSH2_MSG_SERVICE_REQUEST sent debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: publickey,password debug1: Next authentication method: publickey debug1: Offering RSA public key: /Users/wangxiaoxiao/.ssh/id_rsa debug1: Authentications that can continue: publickey,password debug1: Trying private key: /Users/wangxiaoxiao/.ssh/id_dsa debug1: Trying private key: /Users/wangxiaoxiao/.ssh/id_ecdsa debug1: Trying private key: /Users/wangxiaoxiao/.ssh/id_ed25519 debug1: Next authentication method: password xxwang@115.156.164.251's password: debug1: Authentications that can continue: publickey,password Permission denied, please try again. xxwang@115.156.164.251's password: debug1: Authentications that can continue: publickey,password Permission denied, please try again. xxwang@115.156.164.251's password: debug1: Authentications that can continue: publickey,password debug1: No more authentication methods to try. Permission denied (publickey,password).``` ``` 然后我谷歌了一下,按照网上的方法,把.ssh删了,再重新ssh-keygen重新生成,后再ssh,依然存在这个同样的问题?

PHP-运行远程SSH脚本并将结果打印在网页中

<div class="post-text" itemprop="text"> <p>First of all PHP is nowhere near my forte but I’m determined to learn. I’ve probably not been assigned the easiest of tasks for a first PHP project so bear with me whilst I try and explain. I want to within a simple form enter a server name, click submit and the following to occur there after:</p> <ol> <li>Copy a script</li> <li>Execute the script </li> <li>Return the results </li> </ol> <p>Rather than tackle it all in one chunk, It made sense (to me) to break it down and start small:</p> <pre><code>&lt;?php $conn = ssh2_connect('10.x.x.x', 22); ssh2_auth_password($conn, 'user', 'password'); ssh2_scp_send($conn, '/path/to/script', '/path/to/script', 0700); $stream = ssh2_exec($conn, '/path/to/script'); stream_set_blocking($stream, true); $stream_out = ssh2_fetch_stream($stream, SSH2_STREAM_STDIO); echo stream_get_contents($stream_out); ?&gt; # php –f name-of-script.php </code></pre> <p>This worked fine from the command line and the expected response was returned.</p> <p>I wanted to extend this and have the same functionality within a browser so I created a simple form as follows:</p> <pre><code>&lt;form action="name-of-script.php" method="POST"&gt; Server Name: &lt;input type="text" name="node" size="20"&gt; &lt;input type="submit" value="Submit"&gt; &lt;/form&gt; </code></pre> <p>Then altered my code slightly:</p> <pre><code>&lt;?php $node = $_POST["node"]; $conn = ssh2_connect($node, 22); ssh2_auth_password($conn, 'user', 'password'); ssh2_scp_send($conn, '/path/to/script', '/path/to/script', 0700); $stream = ssh2_exec($conn, '/path/to/script'); stream_set_blocking($stream, true); $stream_out = ssh2_fetch_stream($stream, SSH2_STREAM_STDIO); echo stream_get_contents($stream_out); ?&gt; </code></pre> <p>Have I made a fundamental mistake by expecting all the SSH2 functions to produce the same result as the command line within a browser? All I see at the moment is a blank page after entering the server name and clicking submit.</p> </div>

使用crypto / ssh的golang scp文件

<div class="post-text" itemprop="text"> <p>I'm trying to download a remote file over ssh The following approach works fine on shell</p> <pre><code>ssh hostname "tar cz /opt/local/folder" &gt; folder.tar.gz </code></pre> <p>However the same approach on golang giving some difference in output artifact size. For example the same folders with pure shell produce artifact gz file 179B and same with go script 178B. I assume that something has been missed from io.Reader or session got closed earlier. Kindly ask you guys to help.</p> <p>Here is the example of my script:</p> <pre><code>func executeCmd(cmd, hostname string, config *ssh.ClientConfig, path string) error { conn, _ := ssh.Dial("tcp", hostname+":22", config) session, err := conn.NewSession() if err != nil { panic("Failed to create session: " + err.Error()) } r, _ := session.StdoutPipe() scanner := bufio.NewScanner(r) go func() { defer session.Close() name := fmt.Sprintf("%s/backup_folder_%v.tar.gz", path, time.Now().Unix()) file, err := os.OpenFile(name, os.O_APPEND|os.O_WRONLY|os.O_CREATE, 0644) if err != nil { panic(err) } defer file.Close() for scanner.Scan() { fmt.Println(scanner.Bytes()) if err := scanner.Err(); err != nil { fmt.Println(err) } if _, err = file.Write(scanner.Bytes()); err != nil { log.Fatal(err) } } }() if err := session.Run(cmd); err != nil { fmt.Println(err.Error()) panic("Failed to run: " + err.Error()) } return nil } </code></pre> <p>Thanks!</p> </div>

使用PHP设置SSH连接和SFTP

<div class="post-text" itemprop="text"> <p>I'm trying to set up a <code>ssh</code> connection, and later a <code>sftp</code> connection to transfer file via FTP to my server. I have used FileZilla to upload files successfully before.</p> <p>These are my login terminal command and FileZilla login information:</p> <pre><code>ssh b0xxxxx@linux7.aa.bb.cc.dd Host: sftp://linux7.aa.bb.cc.dd Username: b0xx Port: 22 </code></pre> <p>Here is my <code>php</code> code:</p> <pre><code>&lt;?php $ftp_server = "b0xx@linux7.aa.bb.cc.dd"; $ftp_port = 22; $ftp_user = "b0xx"; $ftp_pass = "##"; $connection = ssh2_connect($ftp_server, $ftp_port); echo "Successful! "; if (ssh2_auth_password($connection, $ftp_user, $ftp_pass)) { echo "Successful "; } else { die ('Failed...'); } $sftp = ssh2_sftp($connection); ssh2_scp_send($connection, '/local/filename', '/remote/filename', 0644); ?&gt; </code></pre> <p>Question 1: Can I just use <code>ftp</code> functions to upload/download file from my server? Or do I must set up <code>ssh</code>?</p> <p>Question 2: When I execute the code, the website only displays </p> <pre><code>Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. </code></pre> <p>which means that the code does not execute <code>connection</code> successfully. Does anyone know the cause of the bug?</p> <p>Very much appreciate the help.</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). 在网上各种方法都试过啦 请问我该如何解决这一问题

SCP执行到100%后卡住,服务端中文件缺少部分

从linux中scp到 cygwn时,时有发生卡在100%的问题 通过查看进程信息,得知client与server端的ssh连接未关闭; 有个方向: 通过查看成功scp文件的strace信息,发现一般read 数据大小为16324、49152,这些都是1024的倍数。 而scp失败的情况下,出现了read 32767(32768=1024*32).同时在网上查到,如果文件里出现'\0'会发生pipe end的情况。 所以猜想文件传输过程中是不是有'\0'。这里有很多漏洞,强行猜想的吧。scp失败的文件,多scp几次可以成功。。。。。 各错误代码的具体信息为: Windows Error 109 : ERROR_BROKEN_PIPE: The pipe has been ended. Windows Error 232 : ERROR_NO_DATA: The pipe is being closed. 以下分别是client、server端的strace信息: client: write(6, "\350\264\267\346\254\276\345\210\227\350\241\250\0012016-01-06 08:36:08"..., 16384) = 16384 read(3, "88-4422-919e-edb4ae22b058\001827207"..., 15710) = 15710 write(6, "88-4422-919e-edb4ae22b058\001827207"..., 15710) = 15710 fcntl(6, F_GETFL) = 0x801 (flags O_WRONLY|O_NONBLOCK) fcntl(6, F_SETFL, O_WRONLY) = 0 alarm(0) = 1 getpgrp() = 45147 ioctl(1, TIOCGPGRP, [45147]) = 0 write(1, "\rTD_APP_EVENT_20160106.txt "..., 211) = 211 write(1, "\n", 1) = 1 close(3) = 0 write(6, "\0", 1) = 1 read(7, server: 51 479824835 [main] scp 4564 peek_pipe: /dev/fd/pipe:[6], already ready for read 44 479824879 [main] scp 4564 set_bits: me 0x80049C38, testing fd 0 (/dev/fd/pipe:[6]) 43 479824922 [main] scp 4564 set_bits: ready 1 43 479824965 [main] scp 4564 select_stuff::cleanup: calling cleanup routines 139 479825104 [main] scp 4564 select_stuff::destroy: deleting select records 81 479825185 [main] scp 4564 select_stuff::cleanup: calling cleanup routines 46 479825231 [main] scp 4564 select_stuff::destroy: deleting select records 66 479825297 [main] scp 4564 cygwin_select: 1 = select(1, 0x28A210, 0x28A1F0, 0x28A1D0, 0x0) 64 479825361 [main] scp 4564 read: read(0, 0x8003D98F, 32767) nonblocking 81 479825442 [main] scp 4564 fhandler_base_overlapped::wait_overlapped: EOF, Win32 error 109 50 479825492 [main] scp 4564 fhandler_base::read: returning 0, binary mode 10984 479836476 [main] scp 4564 read: 0 = read(0, 0x8003D98F, 32767) 53 479836529 [main] scp 4564 read: read(0, 0x8003D98F, 32767) nonblocking 61 479836590 [main] scp 4564 fhandler_base_overlapped::wait_overlapped: EOF, Win32 error 109 46 479836636 [main] scp 4564 fhandler_base::read: returning 0, binary mode 57 479836693 [main] scp 4564 read: 0 = read(0, 0x8003D98F, 32767) 58 479836751 [main] scp 4564 fcntl64: fcntl(1, 3, ...) 73 479836824 [main] scp 4564 fhandler_base::fcntl: GETFL: 0x10001 46 479836870 [main] scp 4564 fcntl64: 65537 = fcntl(1, 3, 0x0) 8294 479845164 [main] scp 4564 _cygwin_istext_for_stdio: fd 1: opened as binary 530 479845694 [main] scp 4564 time: 1452148171 = time(0x0) 48 479845742 [main] scp 4564 fstat64: 0 = fstat(1, 0x28A180) 1826 479847568 [main] scp 4564 fhandler_base_overlapped::wait_overlapped: res 4, Win32 Error 232 79 479847647 [main] scp 4564 seterrno_from_win_error: /home/corinna/src/cygwin/cygwin-1.7.32/cygwin-1.7.32-1.i686/src/src/winsup/cygwin/fhandler.cc:2038 windows error 232 84 479847731 [main] scp 4564 geterrno_from_win_error: windows error 232 == errno 32 70 479847801 [main] scp 4564 kill0: kill (4564, 13) 50 479847851 [main] scp 4564 sig_send: sendsig 0xA0, pid 4564, signal 13, its_me 1 48 479847899 [main] scp 4564 sig_send: wakeup 0x11C 133 479848032 [sig] scp 4564 sigpacket::process: signal 13 processing 64 479848096 [sig] scp 4564 init_cygheap::find_tls: sig 13 59 479848155 [sig] scp 4564 sigpacket::process: using tls 0x28CE64 93 479848248 [sig] scp 4564 sigpacket::process: signal 13, signal handler 0x6102F600 43 479848291 [sig] scp 4564 sigpacket::setup_handler: controlled interrupt. stackptr 0x28DB5C, stack 0x28DB58, stackptr[-1] 0x401E1B 51 479848342 [sig] scp 4564 proc_subproc: args: 5, 1 39 479848381 [sig] scp 4564 proc_subproc: clear waiting threads 60 479848441 [sig] scp 4564 proc_subproc: finished clearing 40 479848481 [sig] scp 4564 proc_subproc: returning 1 92 479848573 [sig] scp 4564 _cygtls::interrupt_setup: armed signal_arrived 0x100, signal 13 41 479848614 [sig] scp 4564 sigpacket::setup_handler: signal 13 delivered 62 479848676 [sig] scp 4564 sigpacket::process: returning 1 54 479848730 [sig] scp 4564 wait_sig: signalling pack.wakeup 0x11C 94 479848824 [main] scp 4564 sig_send: Waiting for pack.wakeup 0x11C 53 479848877 [main] scp 4564 set_process_mask_delta: oldmask 0, newmask 0, deltamask 0 90 479848967 [main] scp 4564 signal_exit: exiting due to signal 13 65 479849032 [main] scp 4564 signal_exit: about to call do_exit (D) 48 479849080 [main] scp 4564 do_exit: do_exit (13), exit_state 2 41 479849121 [main] scp 4564 void: 0x0 = signal (20, 0x1) 38 479849159 [main] scp 4564 void: 0x0 = signal (1, 0x1) 37 479849196 [main] scp 4564 void: 0x0 = signal (2, 0x1) 37 479849233 [main] scp 4564 void: 0x0 = signal (3, 0x1) 77 479849310 [main] scp 4564 fhandler_base::close: closing '/dev/fd/pipe:[6]' handle 0x1BC 61 479849371 [main] scp 4564 fhandler_base::close: closing 'pipe:[9]' handle 0x264 56 479849427 [main] scp 4564 fhandler_base::close: closing 'pipe:[11]' handle 0x268 82 479849509 [main] scp 4564 fhandler_base::close: closing '/sftphome/jk_sftp/talkingdata/TD_APP_EVENT/20160106/TD_APP_EVENT_20160106.txt' handle 0x104 219 479849728 [main] scp 4564 getpid: 4564 = getpid() 68 479849796 [main] scp 4564 proc_terminate: nprocs 0 44 479849840 [main] scp 4564 proc_terminate: leaving 45 479849885 [main] scp 4564 pinfo::exit: Calling ExitProcess n 0xD, exitcode 0xD

MySQL 8.0.19安装教程(windows 64位)

话不多说直接开干 目录 1-先去官网下载点击的MySQL的下载​ 2-配置初始化的my.ini文件的文件 3-初始化MySQL 4-安装MySQL服务 + 启动MySQL 服务 5-连接MySQL + 修改密码 先去官网下载点击的MySQL的下载 下载完成后解压 解压完是这个样子 配置初始化的my.ini文件的文件 ...

Python+OpenCV计算机视觉

Python+OpenCV计算机视觉系统全面的介绍。

Vue.js 2.0之全家桶系列视频课程

基于新的Vue.js 2.3版本, 目前新全的Vue.js教学视频,让你少走弯路,直达技术前沿! 1. 包含Vue.js全家桶(vue.js、vue-router、axios、vuex、vue-cli、webpack、ElementUI等) 2. 采用笔记+代码案例的形式讲解,通俗易懂

navicat(内含激活码)

navicat支持mysql的可视化操作,内涵激活码,不用再忍受弹框的痛苦。

HTML期末大作业

这是我自己做的HTML期末大作业,花了很多时间,稍加修改就可以作为自己的作业了,而且也可以作为学习参考

150讲轻松搞定Python网络爬虫

【为什么学爬虫?】 &nbsp; &nbsp; &nbsp; &nbsp;1、爬虫入手容易,但是深入较难,如何写出高效率的爬虫,如何写出灵活性高可扩展的爬虫都是一项技术活。另外在爬虫过程中,经常容易遇到被反爬虫,比如字体反爬、IP识别、验证码等,如何层层攻克难点拿到想要的数据,这门课程,你都能学到! &nbsp; &nbsp; &nbsp; &nbsp;2、如果是作为一个其他行业的开发者,比如app开发,web开发,学习爬虫能让你加强对技术的认知,能够开发出更加安全的软件和网站 【课程设计】 一个完整的爬虫程序,无论大小,总体来说可以分成三个步骤,分别是: 网络请求:模拟浏览器的行为从网上抓取数据。 数据解析:将请求下来的数据进行过滤,提取我们想要的数据。 数据存储:将提取到的数据存储到硬盘或者内存中。比如用mysql数据库或者redis等。 那么本课程也是按照这几个步骤循序渐进的进行讲解,带领学生完整的掌握每个步骤的技术。另外,因为爬虫的多样性,在爬取的过程中可能会发生被反爬、效率低下等。因此我们又增加了两个章节用来提高爬虫程序的灵活性,分别是: 爬虫进阶:包括IP代理,多线程爬虫,图形验证码识别、JS加密解密、动态网页爬虫、字体反爬识别等。 Scrapy和分布式爬虫:Scrapy框架、Scrapy-redis组件、分布式爬虫等。 通过爬虫进阶的知识点我们能应付大量的反爬网站,而Scrapy框架作为一个专业的爬虫框架,使用他可以快速提高我们编写爬虫程序的效率和速度。另外如果一台机器不能满足你的需求,我们可以用分布式爬虫让多台机器帮助你快速爬取数据。 &nbsp; 从基础爬虫到商业化应用爬虫,本套课程满足您的所有需求! 【课程服务】 专属付费社群+每周三讨论会+1v1答疑

三个项目玩转深度学习(附1G源码)

从事大数据与人工智能开发与实践约十年,钱老师亲自见证了大数据行业的发展与人工智能的从冷到热。事实证明,计算机技术的发展,算力突破,海量数据,机器人技术等,开启了第四次工业革命的序章。深度学习图像分类一直是人工智能的经典任务,是智慧零售、安防、无人驾驶等机器视觉应用领域的核心技术之一,掌握图像分类技术是机器视觉学习的重中之重。针对现有线上学习的特点与实际需求,我们开发了人工智能案例实战系列课程。打造:以项目案例实践为驱动的课程学习方式,覆盖了智能零售,智慧交通等常见领域,通过基础学习、项目案例实践、社群答疑,三维立体的方式,打造最好的学习效果。

基于STM32的电子时钟设计

时钟功能 还有闹钟功能,温湿度功能,整点报时功能 你值得拥有

学生成绩管理系统(PHP + MYSQL)

做的是数据库课程设计,使用的php + MySQL,本来是黄金搭配也就没啥说的,推荐使用wamp服务器,里面有详细的使用说明,带有界面的啊!呵呵 不行的话,可以给我留言!

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

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

程序员的兼职技能课

获取讲师答疑方式: 在付费视频第一节(触摸命令_ALL)片头有二维码及加群流程介绍 限时福利 原价99元,今日仅需39元!购课添加小助手(微信号:itxy41)按提示还可领取价值800元的编程大礼包! 讲师介绍: 苏奕嘉&nbsp;前阿里UC项目工程师 脚本开发平台官方认证满级(六级)开发者。 我将如何教会你通过【定制脚本】赚到你人生的第一桶金? 零基础程序定制脚本开发课程,是完全针对零脚本开发经验的小白而设计,课程内容共分为3大阶段: ①前期将带你掌握Q开发语言和界面交互开发能力; ②中期通过实战来制作有具体需求的定制脚本; ③后期将解锁脚本的更高阶玩法,打通任督二脉; ④应用定制脚本合法赚取额外收入的完整经验分享,带你通过程序定制脚本开发这项副业,赚取到你的第一桶金!

实用主义学Python(小白也容易上手的Python实用案例)

原价169,限时立减100元! 系统掌握Python核心语法16点,轻松应对工作中80%以上的Python使用场景! 69元=72讲+源码+社群答疑+讲师社群分享会&nbsp; 【哪些人适合学习这门课程?】 1)大学生,平时只学习了Python理论,并未接触Python实战问题; 2)对Python实用技能掌握薄弱的人,自动化、爬虫、数据分析能让你快速提高工作效率; 3)想学习新技术,如:人工智能、机器学习、深度学习等,这门课程是你的必修课程; 4)想修炼更好的编程内功,优秀的工程师肯定不能只会一门语言,Python语言功能强大、使用高效、简单易学。 【超实用技能】 从零开始 自动生成工作周报 职场升级 豆瓣电影数据爬取 实用案例 奥运冠军数据分析 自动化办公:通过Python自动化分析Excel数据并自动操作Word文档,最终获得一份基于Excel表格的数据分析报告。 豆瓣电影爬虫:通过Python自动爬取豆瓣电影信息并将电影图片保存到本地。 奥运会数据分析实战 简介:通过Python分析120年间奥运会的数据,从不同角度入手分析,从而得出一些有趣的结论。 【超人气老师】 二两 中国人工智能协会高级会员 生成对抗神经网络研究者 《深入浅出生成对抗网络:原理剖析与TensorFlow实现》一书作者 阿里云大学云学院导师 前大型游戏公司后端工程师 【超丰富实用案例】 0)图片背景去除案例 1)自动生成工作周报案例 2)豆瓣电影数据爬取案例 3)奥运会数据分析案例 4)自动处理邮件案例 5)github信息爬取/更新提醒案例 6)B站百大UP信息爬取与分析案例 7)构建自己的论文网站案例

Java8零基础入门视频教程

这门课程基于主流的java8平台,由浅入深的详细讲解了java SE的开发技术,可以使java方向的入门学员,快速扎实的掌握java开发技术!

Python数据挖掘简易入门

&nbsp; &nbsp; &nbsp; &nbsp; 本课程为Python数据挖掘方向的入门课程,课程主要以真实数据为基础,详细介绍数据挖掘入门的流程和使用Python实现pandas与numpy在数据挖掘方向的运用,并深入学习如何运用scikit-learn调用常用的数据挖掘算法解决数据挖掘问题,为进一步深入学习数据挖掘打下扎实的基础。

零基础学C#编程—C#从小白到大咖

本课程从初学者角度出发,提供了C#从入门到成为程序开发高手所需要掌握的各方面知识和技术。 【课程特点】 1 由浅入深,编排合理; 2 视频讲解,精彩详尽; 3 丰富实例,轻松易学; 4 每章总结配有难点解析文档。 15大章节,228课时,1756分钟与你一同进步!

MySQL数据库面试题(2020最新版)

文章目录数据库基础知识为什么要使用数据库什么是SQL?什么是MySQL?数据库三大范式是什么mysql有关权限的表都有哪几个MySQL的binlog有有几种录入格式?分别有什么区别?数据类型mysql有哪些数据类型引擎MySQL存储引擎MyISAM与InnoDB区别MyISAM索引与InnoDB索引的区别?InnoDB引擎的4大特性存储引擎选择索引什么是索引?索引有哪些优缺点?索引使用场景(重点)...

多功能数字钟.zip

利用数字电子计数知识设计并制作的数字电子钟(含multisim仿真),该数字钟具有显示星期、24小时制时间、闹铃、整点报时、时间校准功能

极简JAVA学习营第四期(报名以后加助教微信:eduxy-1)

想学好JAVA必须要报两万的培训班吗? Java大神勿入 如果你: 零基础想学JAVA却不知道从何入手 看了一堆书和视频却还是连JAVA的环境都搭建不起来 囊中羞涩面对两万起的JAVA培训班不忍直视 在职没有每天大块的时间专门学习JAVA 那么恭喜你找到组织了,在这里有: 1. 一群志同道合立志学好JAVA的同学一起学习讨论JAVA 2. 灵活机动的学习时间完成特定学习任务+每日编程实战练习 3. 热心助人的助教和讲师及时帮你解决问题,不按时完成作业小心助教老师的家访哦 上一张图看看前辈的感悟: &nbsp; &nbsp; 大家一定迫不及待想知道什么是极简JAVA学习营了吧,下面就来给大家说道说道: 什么是极简JAVA学习营? 1. 针对Java小白或者初级Java学习者; 2. 利用9天时间,每天1个小时时间; 3.通过 每日作业 / 组队PK / 助教答疑 / 实战编程 / 项目答辩 / 社群讨论 / 趣味知识抢答等方式让学员爱上学习编程 , 最终实现能独立开发一个基于控制台的‘库存管理系统’ 的学习模式 极简JAVA学习营是怎么学习的? &nbsp; 如何报名? 只要购买了极简JAVA一:JAVA入门就算报名成功! &nbsp;本期为第四期极简JAVA学习营,我们来看看往期学员的学习状态: 作业看这里~ &nbsp; 助教的作业报告是不是很专业 不交作业打屁屁 助教答疑是不是很用心 &nbsp; 有奖抢答大家玩的很嗨啊 &nbsp; &nbsp; 项目答辩终于开始啦 &nbsp; 优秀者的获奖感言 &nbsp; 这是答辩项目的效果 &nbsp; &nbsp; 这么细致的服务,这么好的氛围,这样的学习效果,需要多少钱呢? 不要1999,不要199,不要99,只要9.9 是的你没听错,只要9.9以上所有就都属于你了 如果你: 1、&nbsp;想学JAVA没有基础 2、&nbsp;想学JAVA没有整块的时间 3、&nbsp;想学JAVA没有足够的预算 还等什么?赶紧报名吧,抓紧抢位,本期只招300人,错过只有等时间待定的下一期了 &nbsp; 报名请加小助手微信:eduxy-1 &nbsp; &nbsp;

Python可以这样学(第一季:Python内功修炼)

董付国系列教材《Python程序设计基础》、《Python程序设计(第2版)》、《Python可以这样学》配套视频,讲解Python 3.5.x和3.6.x语法、内置对象用法、选择与循环以及函数设计与使用、lambda表达式用法、字符串与正则表达式应用、面向对象编程、文本文件与二进制文件操作、目录操作与系统运维、异常处理结构。

Java基础知识面试题(2020最新版)

文章目录Java概述何为编程什么是Javajdk1.5之后的三大版本JVM、JRE和JDK的关系什么是跨平台性?原理是什么Java语言有哪些特点什么是字节码?采用字节码的最大好处是什么什么是Java程序的主类?应用程序和小程序的主类有何不同?Java应用程序与小程序之间有那些差别?Java和C++的区别Oracle JDK 和 OpenJDK 的对比基础语法数据类型Java有哪些数据类型switc...

机器学习实战系列套餐(必备基础+经典算法+案例实战)

机器学习实战系列套餐以实战为出发点,帮助同学们快速掌握机器学习领域必备经典算法原理并结合Python工具包进行实战应用。建议学习顺序:1.Python必备工具包:掌握实战工具 2.机器学习算法与实战应用:数学原理与应用方法都是必备技能 3.数据挖掘实战:通过真实数据集进行项目实战。按照下列课程顺序学习即可! 课程风格通俗易懂,用最接地气的方式带领大家轻松进军机器学习!提供所有课程代码,PPT与实战数据,有任何问题欢迎随时与我讨论。

Java面试题大全(2020版)

发现网上很多Java面试题都没有答案,所以花了很长时间搜集整理出来了这套Java面试题大全,希望对大家有帮助哈~ 本套Java面试题大全,全的不能再全,哈哈~ 一、Java 基础 1. JDK 和 JRE 有什么区别? JDK:Java Development Kit 的简称,java 开发工具包,提供了 java 的开发环境和运行环境。 JRE:Java Runtime Environ...

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

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

深度学习原理+项目实战+算法详解+主流框架(套餐)

深度学习系列课程从深度学习基础知识点开始讲解一步步进入神经网络的世界再到卷积和递归神经网络,详解各大经典网络架构。实战部分选择当下最火爆深度学习框架PyTorch与Tensorflow/Keras,全程实战演示框架核心使用与建模方法。项目实战部分选择计算机视觉与自然语言处理领域经典项目,从零开始详解算法原理,debug模式逐行代码解读。适合准备就业和转行的同学们加入学习! 建议按照下列课程顺序来进行学习 (1)掌握深度学习必备经典网络架构 (2)深度框架实战方法 (3)计算机视觉与自然语言处理项目实战。(按照课程排列顺序即可)

HoloLens2开发入门教程

本课程为HoloLens2开发入门教程,讲解部署开发环境,安装VS2019,Unity版本,Windows SDK,创建Unity项目,讲解如何使用MRTK,编辑器模拟手势交互,打包VS工程并编译部署应用到HoloLens上等。

几率大的Redis面试题(含答案)

本文的面试题如下: Redis 持久化机制 缓存雪崩、缓存穿透、缓存预热、缓存更新、缓存降级等问题 热点数据和冷数据是什么 Memcache与Redis的区别都有哪些? 单线程的redis为什么这么快 redis的数据类型,以及每种数据类型的使用场景,Redis 内部结构 redis的过期策略以及内存淘汰机制【~】 Redis 为什么是单线程的,优点 如何解决redis的并发竞争key问题 Red...

MFC一站式终极全套课程包

该套餐共包含从C小白到C++到MFC的全部课程,整套学下来绝对成为一名C++大牛!!!

【数据结构与算法综合实验】欢乐连连看(C++ & MFC)案例

这是武汉理工大学计算机学院数据结构与算法综合实验课程的第三次项目:欢乐连连看(C++ & MFC)迭代开发代码。运行环境:VS2017。已经实现功能:开始游戏、消子、判断胜负、提示、重排、计时、帮助。

YOLOv3目标检测实战:训练自己的数据集

YOLOv3是一种基于深度学习的端到端实时目标检测方法,以速度快见长。本课程将手把手地教大家使用labelImg标注和使用YOLOv3训练自己的数据集。课程分为三个小项目:足球目标检测(单目标检测)、梅西目标检测(单目标检测)、足球和梅西同时目标检测(两目标检测)。 本课程的YOLOv3使用Darknet,在Ubuntu系统上做项目演示。包括:安装Darknet、给自己的数据集打标签、整理自己的数据集、修改配置文件、训练自己的数据集、测试训练出的网络模型、性能统计(mAP计算和画出PR曲线)和先验框聚类。 Darknet是使用C语言实现的轻型开源深度学习框架,依赖少,可移植性好,值得深入探究。 除本课程《YOLOv3目标检测实战:训练自己的数据集》外,本人推出了有关YOLOv3目标检测的系列课程,请持续关注该系列的其它课程视频,包括: 《YOLOv3目标检测实战:交通标志识别》 《YOLOv3目标检测:原理与源码解析》 《YOLOv3目标检测:网络模型改进方法》 敬请关注并选择学习!

u-boot-2015.07.tar.bz2

uboot-2015-07最新代码,喜欢的朋友请拿去

相关热词 c# cad插入影像 c#设计思想 c#正则表达式 转换 c#form复制 c#写web c# 柱形图 c# wcf 服务库 c#应用程序管理器 c#数组如何赋值给数组 c#序列化应用目的博客园
立即提问