真是奇了 ,誰幫我試試,你那是不是這樣。作者: lkk2003rty 時(shí)間: 2010-11-25 10:44
見putty的FAQ
A.7.6 When attempting a file transfer, either PSCP or PSFTP says ‘Out of memory’ and dies.
This is almost always caused by your login scripts on the server generating output. PSCP or PSFTP will receive that output when they were expecting to see the start of a file transfer protocol, and they will attempt to interpret the output as file-transfer protocol. This will usually lead to an ‘out of memory’ error for much the same reasons as given in question A.7.5.
This is a setup problem in your account on your server, not a PSCP/PSFTP bug. Your login scripts should never generate output during non-interactive sessions; secure file transfer is not the only form of remote access that will break if they do.
On Unix, a simple fix is to ensure that all the parts of your login script that might generate output are in .profile (if you use a Bourne shell derivative) or .login (if you use a C shell). Putting them in more general files such as .bashrc or .cshrc is liable to lead to problems.
http://www.chiark.greenend.org.uk/~sgtatham/putty/faq.html作者: icykiss 時(shí)間: 2012-08-17 16:41
今天我也遇到差不多的情況了。
我在bashrc中加入了一個(gè)df -h用來每次登錄看硬盤大。▊(gè)人需要,因?yàn)橛脖P是作數(shù)據(jù)交互的,但用處不大,就這么湊合了),結(jié)果用FILEZILLA登錄SFTP,提示out of memory。
后來改在在crontab中把df -h寫到/tmp/df_h中,在bashrc中用cat來顯示也不行。
最后想起昨天搞screen時(shí)提示的:Cannot open your terminal '/dev/pts/1' - please check,這個(gè)錯誤讓我想到了SFTP登錄和普通登錄的區(qū)別,然后把bashrc中的改成下面這樣:
if [ ! '' = `tty |grep dev` ]; then df -h; fi
是很無語的作法,BUT IT WORKS WELL!作者: zhsh87 時(shí)間: 2012-08-17 17:23
你會發(fā)現(xiàn),如果用rsync傳文件的話也會報(bào)錯的,所以不能在bash_profile和bashrc里面增加echo之類的命令,你要是想加點(diǎn)內(nèi)容,可以往/etc/motd里面加作者: rdcwayx 時(shí)間: 2012-08-20 09:25