免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 14694 | 回复: 9
打印 上一主题 下一主题

SFTP文件传输提示协议无法初始化! [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2010-03-25 09:40 |只看该作者 |倒序浏览
本帖最后由 iuingeng 于 2010-03-25 09:50 编辑

操作系统版本:suse linux es 10.sp1

在windows客户端上使用winscp下载文件,sftp出现如下错误:


我找了另外一台sftp正常的服务器,执行scp命令,试图从该问题服务器上下载文件,输入密码后无任何提示,结束。

论坛徽章:
1
天秤座
日期:2013-10-23 13:20:42
2 [报告]
发表于 2010-03-25 10:50 |只看该作者
不熟悉suse 中的sftp的,redhat中是无需配置的

论坛徽章:
0
3 [报告]
发表于 2010-03-26 09:24 |只看该作者
不熟悉suse 中的sftp的,redhat中是无需配置的
jerryjzm 发表于 2010-03-25 10:50


suse中也无需配置。只是最近装了个软件,就出现这个问题。

论坛徽章:
0
4 [报告]
发表于 2010-03-30 08:08 |只看该作者
居然没有人回应,,看来这个问题难以解决了。。

论坛徽章:
0
5 [报告]
发表于 2010-03-30 08:48 |只看该作者
贴出你的 sshd 配置文件,其中应含有 sftp 的信息

论坛徽章:
0
6 [报告]
发表于 2010-03-31 11:23 |只看该作者
贴出你的 sshd 配置文件,其中应含有 sftp 的信息
platinum 发表于 2010-03-30 08:48

呵呵,我实在没发现跟那个有关的参数,麻烦你看看~

sshd_config文件内容:
  1. #        $OpenBSD: sshd_config,v 1.72 2005/07/25 11:59:40 markus Exp $

  2. # This is the sshd server system-wide configuration file.  See
  3. # sshd_config(5) for more information.

  4. # This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin

  5. # The strategy used for options in the default sshd_config shipped with
  6. # OpenSSH is to specify options with their default value where
  7. # possible, but leave them commented.  Uncommented options change a
  8. # default value.

  9. #Port 22
  10. #Protocol 2,1
  11. #AddressFamily any
  12. #ListenAddress 0.0.0.0
  13. #ListenAddress ::

  14. # HostKey for protocol version 1
  15. #HostKey /etc/ssh/ssh_host_key
  16. # HostKeys for protocol version 2
  17. #HostKey /etc/ssh/ssh_host_rsa_key
  18. #HostKey /etc/ssh/ssh_host_dsa_key

  19. # Lifetime and size of ephemeral version 1 server key
  20. #KeyRegenerationInterval 1h
  21. #ServerKeyBits 768

  22. # Logging
  23. # obsoletes QuietMode and FascistLogging
  24. #SyslogFacility AUTH
  25. #LogLevel INFO

  26. # Authentication:

  27. #LoginGraceTime 2m
  28. #PermitRootLogin yes
  29. #StrictModes yes
  30. #MaxAuthTries 6

  31. #RSAAuthentication yes
  32. #PubkeyAuthentication yes
  33. #AuthorizedKeysFile        .ssh/authorized_keys

  34. # For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
  35. #RhostsRSAAuthentication no
  36. # similar for protocol version 2
  37. #HostbasedAuthentication no
  38. # Change to yes if you don't trust ~/.ssh/known_hosts for
  39. # RhostsRSAAuthentication and HostbasedAuthentication
  40. #IgnoreUserKnownHosts no
  41. # Don't read the user's ~/.rhosts and ~/.shosts files
  42. #IgnoreRhosts yes

  43. # To disable tunneled clear text passwords, change to no here!
  44. PasswordAuthentication no
  45. #PermitEmptyPasswords no

  46. # Change to no to disable s/key passwords
  47. #ChallengeResponseAuthentication yes

  48. # Kerberos options
  49. #KerberosAuthentication no
  50. #KerberosOrLocalPasswd yes
  51. #KerberosTicketCleanup yes
  52. #KerberosGetAFSToken no

  53. # GSSAPI options
  54. #GSSAPIAuthentication no
  55. #GSSAPICleanupCredentials yes

  56. # Set this to 'yes' to enable support for the deprecated 'gssapi' authentication
  57. # mechanism to OpenSSH 3.8p1. The newer 'gssapi-with-mic' mechanism is included
  58. # in this release. The use of 'gssapi' is deprecated due to the presence of
  59. # potential man-in-the-middle attacks, which 'gssapi-with-mic' is not susceptible to.
  60. #GSSAPIEnableMITMAttack no


  61. # Set this to 'yes' to enable PAM authentication, account processing,
  62. # and session processing. If this is enabled, PAM authentication will
  63. # be allowed through the ChallengeResponseAuthentication mechanism.
  64. # Depending on your PAM configuration, this may bypass the setting of
  65. # PasswordAuthentication, PermitEmptyPasswords, and
  66. # "PermitRootLogin without-password". If you just want the PAM account and
  67. # session checks to run without PAM authentication, then enable this but set
  68. # ChallengeResponseAuthentication=no
  69. UsePAM yes

  70. #AllowTcpForwarding yes
  71. #GatewayPorts no
  72. X11Forwarding yes
  73. #X11DisplayOffset 10
  74. #X11UseLocalhost yes
  75. #PrintMotd yes
  76. #PrintLastLog yes
  77. #TCPKeepAlive yes
  78. #UseLogin no
  79. #UsePrivilegeSeparation yes
  80. #PermitUserEnvironment no
  81. #Compression delayed
  82. #ClientAliveInterval 0
  83. #ClientAliveCountMax 3
  84. #UseDNS yes
  85. #PidFile /var/run/sshd.pid
  86. #MaxStartups 10

  87. # no default banner path
  88. #Banner /some/path

  89. # override default of no subsystems
  90. Subsystem        sftp        /usr/lib/ssh/sftp-server

  91. # This enables accepting locale enviroment variables LC_* LANG, see sshd_config(5).
  92. AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
  93. AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
  94. AcceptEnv LC_IDENTIFICATION LC_ALL
复制代码
以下是:ssh_config
  1. #        $OpenBSD: ssh_config,v 1.20 2005/01/28 09:45:53 dtucker Exp $

  2. # This is the ssh client system-wide configuration file.  See
  3. # ssh_config(5) for more information.  This file provides defaults for
  4. # users, and the values can be changed in per-user configuration files
  5. # or on the command line.

  6. # Configuration data is parsed as follows:
  7. #  1. command line options
  8. #  2. user-specific file
  9. #  3. system-wide file
  10. # Any configuration value is only changed the first time it is set.
  11. # Thus, host-specific definitions should be at the beginning of the
  12. # configuration file, and defaults at the end.

  13. # Site-wide defaults for some commonly used options.  For a comprehensive
  14. # list of available options, their meanings and defaults, please see the
  15. # ssh_config(5) man page.

  16. Host *
  17. #   ForwardAgent no
  18. #   ForwardX11 no

  19. # If you do not trust your remote host (or its administrator), you
  20. # should not forward X11 connections to your local X11-display for
  21. # security reasons: Someone stealing the authentification data on the
  22. # remote side (the "spoofed" X-server by the remote sshd) can read your
  23. # keystrokes as you type, just like any other X11 client could do.
  24. # Set this to "no" here for global effect or in your own ~/.ssh/config
  25. # file if you want to have the remote X11 authentification data to
  26. # expire after two minutes after remote login.
  27. ForwardX11Trusted yes

  28. #   RhostsRSAAuthentication no
  29. #   RSAAuthentication yes
  30. #   PasswordAuthentication yes
  31. #   HostbasedAuthentication no
  32. #   BatchMode no
  33. #   CheckHostIP yes
  34. #   AddressFamily any
  35. #   ConnectTimeout 0
  36. #   StrictHostKeyChecking ask
  37. #   IdentityFile ~/.ssh/identity
  38. #   IdentityFile ~/.ssh/id_rsa
  39. #   IdentityFile ~/.ssh/id_dsa
  40. #   Port 22
  41. #   Protocol 2,1
  42. #   Cipher 3des
  43. #   Ciphers aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc
  44. #   EscapeChar ~
  45. #   GSSAPIAuthentication no
  46. #   GSSAPIDelegateCredentials no

  47. # Set this to 'yes' to enable support for the deprecated 'gssapi' authentication
  48. # mechanism to OpenSSH 3.8p1. The newer 'gssapi-with-mic' mechanism is included
  49. # in this release. The use of 'gssapi' is deprecated due to the presence of
  50. # potential man-in-the-middle attacks, which 'gssapi-with-mic' is not susceptible to.
  51. #   GSSAPIEnableMITMAttack no

  52. # This enables sending locale enviroment variables LC_* LANG, see ssh_config(5).
  53. SendEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
  54. SendEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
  55. SendEnv LC_IDENTIFICATION LC_ALL
复制代码

论坛徽章:
0
7 [报告]
发表于 2010-03-31 12:36 |只看该作者
我的有这个

  1. # override default of no subsystems
  2. Subsystem       sftp    /usr/lib/misc/sftp-server
复制代码

论坛徽章:
0
8 [报告]
发表于 2010-04-01 13:04 |只看该作者
我的有这个
platinum 发表于 2010-03-31 12:36

我的也有啊~~~


override default of no subsystems
Subsystem        sftp        /usr/lib/ssh/sftp-server

论坛徽章:
0
9 [报告]
发表于 2010-04-01 19:13 |只看该作者
我的也有啊~~~


override default of no subsystems
Subsystem        sftp        /usr/lib/ssh/sf ...
iuingeng 发表于 2010-04-01 13:04

那为什么之前让你贴信息你没贴出来的却没有呢?自己贪污了?
我是根据你的信息给出的判断,如果你说有,那不知道了

论坛徽章:
0
10 [报告]
发表于 2012-09-27 22:28 |只看该作者
问题原因是 我在root用户的profile里面增加了一行获取环境变量相关设置的文件设置, 类似于source ..的东西。。去掉之后就好了。。但是没搞清楚是为什么。。。
[抱歉当时没回帖,,,今天回来突然看到了。。]
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP