`
fanrey
  • 浏览: 252206 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

Ubuntu中sftp配置问题

    博客分类:
  • sftp
 
阅读更多
OS:Ubuntu 11.04 - the Natty Narwhal
ssh工作正常,但sftp总是有问题,详细信息如下:

H:\>sftp -v ubuntu@147.128.25.32
OpenSSH_6.0p1, OpenSSL 1.0.1b 26 Apr 2012
debug1: Reading configuration data /etc/ssh_config
debug1: Connecting to 147.128.25.32 [147.128.25.32] port 22.
debug1: Connection established.
debug1: identity file /home/efanrui/.ssh/id_rsa type 1
debug1: identity file /home/efanrui/.ssh/id_rsa-cert type -1
debug1: identity file /home/efanrui/.ssh/id_dsa type -1
debug1: identity file /home/efanrui/.ssh/id_dsa-cert type -1
debug1: identity file /home/efanrui/.ssh/id_ecdsa type -1
debug1: identity file /home/efanrui/.ssh/id_ecdsa-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.8p1 Debi
n-1ubuntu3
debug1: match: OpenSSH_5.8p1 Debian-1ubuntu3 pat OpenSSH_5*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.0
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ECDSA 5e:3d:73:f0:4e:94:0e:81:7b:eb:2d:5f:47:b4:a9:2b
debug1: Host '147.128.25.32' is known and matches the ECDSA host key.
debug1: Found key in /home/efanrui/.ssh/known_hosts:9
debug1: ssh_ecdsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-m
c,password
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/efanrui/.ssh/id_rsa
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-m
c,password
debug1: Trying private key: /home/efanrui/.ssh/id_dsa
debug1: Trying private key: /home/efanrui/.ssh/id_ecdsa
debug1: Next authentication method: password
ubuntu@147.128.25.32's password:
debug1: Authentication succeeded (password).
Authenticated to 147.128.25.32 ([147.128.25.32]:22).
debug1: channel 0: new [client-session]
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug1: Sending subsystem: sftp
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
debug1: channel 0: free: client-session, nchannels 1
Transferred: sent 2168, received 1552 bytes, in 1.5 seconds
Bytes per second: sent 1421.5, received 1017.6
debug1: Exit status 127
Connection closed



/var/log/auth.log里log如下:
Aug 14 10:48:36 ubuntu-VirtualBox sshd[10097]: Accepted password for ubuntu from 127.0.0.1 port 54750 ssh2
Aug 14 10:48:36 ubuntu-VirtualBox sshd[10097]: pam_unix(sshd:session): session opened for user ubuntu by (uid=0)
Aug 14 10:48:38 ubuntu-VirtualBox sshd[10171]: subsystem request for sftp by user ubuntu
Aug 14 10:48:38 ubuntu-VirtualBox sshd[10171]: Received disconnect from 127.0.0.1: 11: disconnected by user
Aug 14 10:48:38 ubuntu-VirtualBox sshd[10097]: pam_unix(sshd:session): session closed for user ubuntu


Solution;参考http://forums.debian.net/viewtopic.php?f=5&t=42818

修改/etc/ssh/sshd_config:
from:
Subsystem sftp /usr/lib/openssh/sftp-serverto

to:
Subsystem sftp internal-sftp

然后重启ssh:service ssh restart

root@ubuntu-VirtualBox:/etc/ssh# ps -ef|grep sftp
ubuntu   10778 10777  0 11:04 ?        00:00:00 sshd: ubuntu@internal-sftp
ubuntu   10856 10854  0 11:04 ?        00:00:00 sshd: ubuntu@internal-sftp
root     10886 10417  0 11:06 pts/3    00:00:00 grep --color=auto sftp

分享到:
评论

相关推荐

    Ubuntu系统ssh安装与连接以及sftp文件传送全攻略

    详细的介绍了如何在Ubuntu系统下开启ssh以及sftp服务,以及实现ssh链接以及sftp文件传送的过程。

    SSH 开源图形化 SFTP 客户端 WinSCP 5.17.9.zip

    可将设置存在配置文件中而非注册表中,适合在移动介质上操作 WinSCP 中文绿色版WinSCP 中文绿色版 文件操作 WinSCP 可以执行所有基本的文件操作,例如下载和上传。同时允许为文件和目录重命名、改变属性、建立符号...

    Ubuntu 下安装和配置 FTP服务器

    在这个教程中,我将向你们展示如何在 Ubuntu 中安装、配置并保护 FTP 服务器(VSFTPD 的全称是 “Very Secure FTP Deamon”),从而拥有强大的安全性,能够防范 FTP 漏洞。 第一步:在 Ubuntu 中安装 VSFTPD 服务器

    Ubuntu权威指南(2/2)

    《Ubuntu权威指南》目录 目 录 第1章 系统概述与安装 1 1.1 Linux的兴起与发展 2 1.2 充分利用网上资源 3 1.2.1 Ubuntu官方网站 3 1.2.2 GNU网站 4 1.2.3 Linux文档项目网站 4 1.2.4 网上求助 5 1.3 随时查询随机...

    SublimeText2-文本编辑器-Ubuntu-插件大全

    3.4.14. SFTP 12 3.5. 编辑支持类 13 3.5.1. DocBlockr 13 3.5.2. Sublime Alignment 13 3.5.3. Sublime CodeIntel 14 3.5.4. SublimeTmpl 14 3.5.5. isoD 14 3.5.6. DeleteBlankLines 14 3.5.7. Change Quotes 14 ...

    Ubuntu 用vsftpd 配置FTP服务器教程详解

    本文在Ubuntu Server 14.04 amd64系统测试。 安装ftp sudo apt-get install vsftpd 配置vsftpd.conf sudo nano /etc/vsftpd.conf #禁止匿名访问 anonymous_enable=NO #接受本地用户 local_enable=YES #允许上传 ...

    java版bs公交服务网源码-ubuntu-configuration:ubuntu配置

    的配置 这适用于基于Debian的操作系统,例如: 、 和 。 我更喜欢 Ubuntu 目录 (从官方存储库为 Nvidia 驱动程序安装驱动程序) (Windows 模拟器)(在 linux 上运行 Microsoft:registered: Windows:registered: ...

    Ubuntu权威指南(1/2)

    《Ubuntu权威指南》目录 目 录 第1章 系统概述与安装 1 1.1 Linux的兴起与发展 2 1.2 充分利用网上资源 3 1.2.1 Ubuntu官方网站 3 1.2.2 GNU网站 4 1.2.3 Linux文档项目网站 4 1.2.4 网上求助 5 1.3 随时查询随机...

    WindowsFilezilla ubuntu与windows文件传输工具.rar

    多协议支持: 它支持多种文件传输协议,包括 FTP、SFTP 和 FTPS。这使得用户可以通过加密传输文件来增加安全性。 文件管理功能: 用户可以执行复制、粘贴、删除、重命名等文件管理操作,还可以创建文件夹和设置权限...

    Ubuntu 安装 vsftpd FTP详细步骤

    本教程将告诉你如何在 Linux 系统中搭建自己的 FTP 服务器。  1. 安装 vsftpd。 sudo apt-get install vsftpd   2. 替换配置文件。 用文本编辑器打开 vsftpd.conf 配置文件,一般在 /etc 目录下。 [sudo joe ...

    linux-setups:Linux服务器设置(Ubuntu)

    Ubuntu服务器设置这些是bash脚本,可帮助您设置和配置全新的Ubuntu 14.04 LTS服务器安装(主要在Rackspace上进行了测试,但在其他地方也可以使用)。 apt-get -y updateapt-get -y install git-coregit clone ...

    caddy_and_vsftpd:在AWS上设置Web和FTP服务器的说明和配置

    如果可以使用Ubuntu附带的ssh服务通过SFTP访问,则可能不需要vsftpd。指示使用Ubuntu AMI设置并启动新的EC2 t2.micro实例。 获取您的家庭Xfinity网络的WAN IP地址。 在AWS VPC控制台中,创建或更新“家庭网络” AWS...

    X-Plore_File_Manager_Donate_v4.18.12.apk

    ●云存储访问:Google Drive™,Dropbox,Box.net,Mega.co.nz ***,SkyDrive,Webdav ,Yandex.disk,Ubuntu One,SugarSync,自卸车,Copy.com ●SSH文件传输(SFTP)和SSH Shell – _http://bit.ly/xp-ssh *** ...

    X-plore File Manager.apk

    ●云存储访问:谷歌驱动器™,升降梭箱,Box.net,Mega.co.nz ***,SkyDrive中,webdav的,Yandex.disk,Ubuntu的一个,SugarSync的,自卸车,Copy.com ●SSH文件传输(SFTP)和SSH壳牌 - http://bit.ly/xp-ssh *** ...

    X-Plore File Manager Pro 4.14.01.apk

    ●云存储访问:Google Drive™,Dropbox,Box.net,Mega.co.nz ***,SkyDrive,Webdav ,Yandex.disk,Ubuntu One,SugarSync,自卸车,Copy.com ●SSH文件传输(SFTP)和SSH Shell - _http://bit.ly/xp-ssh *** ...

    百度地图毕业设计源码-lotapp.github.io:杜尼蒂安的文章

    PS:2.CentOS服务器网络配置(动态+静态) 6.添加用户到sudo用户组 7.CentOS7Root用户密码重置 1.2.基础技能 1.Hyper-V装CentOS7(其他虚拟机一样参考) 2.Xshell连接CentOS服务器解密 3.Ubuntu抛弃了Untiy转向Gnome...

    phpbat:一个基于PHP的备份和管理工具

    从rsync / ftp / ftps / sftp或与rsync / ftp / ftps / sftp同步/复制 通过输出,日志文件和邮件进行日志记录(带有级别) 自动自我更新 定制和简单的配置 执照 该软件是根据MIT许可发行的。 请阅读许可以获得信息...

    ansible-restic:Restic的角色

    它支持S3后端或SFTP后端,因此将设置SSH配置和SSH私钥(请参见下面的变量)。 角色变量 固定式安装 如果文件不存在,该角色将下载restic二进制文件(版本restic_version )并将其安装到restic_path 。 如果要强制...

    matlab计算SPI的代码-Module-image:RaspberryPiZero(零,2或3)上嵌入的一组Python脚本。它可以根据p

    Python中的脚本,用于在Ubuntu服务器和Client Raspberry Pi之间通过SFTP协议发送图像。 附有使用说明。 后台->提供支持和学习的其他Python脚本。 建立权威。 2.准备Raspberry Pi(零,2、3) 如果Raspbian的版本是...

Global site tag (gtag.js) - Google Analytics