windows、linux间远程管理及文件传输

0.目的
为windows用户提供一个linux环境。
为linux-linux,linux-windows之间远程管理,文件传输提供便利。

1.Gow
[1].http://wiki.github.com/bmatzelle/gow/
[2].http://github.com/bmatzelle/gow/downloads

1.1.简介
Gow 是一个相当于 Cygwin 的轻量级替代品,里面封装了130 多个的开源工具及 Linux 命令。

1.2.安装


1.3.配置
将 C:/Program Files/Gow/bin 加入PATH环境变量

2.MSYS&MinGW
[1].http://www.mingw.org/wiki/Getting_Started

2.1. 简介
2.1.1. MSYS
Minimal GNU(POSIX)system on Windows,是一个小型的GNU环境,包括
基本的bash,make等等。是Windows下最优秀的GNU环境。

2.1.2. MinGW
MinGW主要由GNU binary utilities、GCC和GDB组成。同时还包括一些必
要的,例如libc(C Runtime),及专门用于Win32环境的API接口库。
如果你想学习linux环境下的编程,而又不想装linux,那你就装一个MinGW
吧。它只用自由软件来生成纯粹的Win32可执行文件的编译环境,它是
Minimalist GNU on Windows的略称。

2.2.安装
安装过程参考[1]Graphical User Interface Installer

2.3.配置
将 C:/MinGW/bin 加入PATH环境变量

2.4.常见问题
2.4.1.中文乱码
默认的Shell显示出来的东西比较丑,而且用ls命令显示中文也是一堆乱码
在msys目录下修改etc/profile文件,ls命令可以正确显示中文了

export PS1='/u@msys /W$ '
export PS2='> '
export PS4='+ '

export LANG=en

alias l='/bin/ls --show-control-chars --color=tty'
alias la='/bin/ls -aF --show-control-chars --color=tty'
alias ll='/bin/ls -alF --show-control-chars --color=tty'
alias ls='/bin/ls --show-control-chars -F --color=tty'
alias clear=clsb
alias vim="/c/Program/ Files/Vim/vim73/vim.exe"
cd "$HOME"

3.PuTTY
[1].http://www.putty.org/
[2].http://www.chiark.greenend.org.uk/~sgtatham/putty/

3.1.简介
PuTTY is an SSH and telnet client, developed originally by Simon Tatham for the
Windows platform. PuTTY is open source software that is available with source
code and is developed and supported by a group of volunteers.

3.2.安装
到主页下载后直接运行即可

3.3.配置
+PuTTY Configruatoin
 +Window
  +Appearance
   -Font settings
    click "change" 字符集:CHINESE_GB2312
  +Translation
   -Received data assumed to be in which character set:UTF-8

3.4.常见问题

4.winsshd
[1].http://www.bitvise.com/winsshd

4.1. 简介
WinSSHD 是一款Windows NT/2000/XP/2003下的SSH服务器。支持如下SSH2服务:
SSH2,SFTP,SCP和端口转发
4.1. 安装
下载WinSSHD5-Inst.exe(http://dl.bitvise.com/WinSSHD5-Inst.exe)
安装时选择个人版

4.2. 配置
在 WinSSHD Control Panel 点击 Open easy settings,

4.2.1.Server settings
保持默认

4.2.2.Windows accounts
点击 Add,添加windows用户帐号:Administrator。该用户用于linux向Windows传输文件。
注:因不知道为什么Virtual accounts用于linux->windows发文件权限不
允许而建立

4.2.3.Virtual accounts
点击Add,填写Virtual account name:zhoubo,设置密码(Virtual account password)
Virtual filesystem layout选择Allow full access
4.3.运行
保存配置,在WinSSHD Control Panel中点击 Start WinSSHD开启ssh服务,
通过ssh(linux)或者PuTTY(windows)登录ssh服务

5. scp

5.1.简介
scp就是secure copy,是用来进行远程文件拷贝的。数据传输使用
ssh,并且和ssh使用相同的认证方式,提供相同的安全保证 。scp
在需要进行验证时会要求你输入密码或口令。

5.2.使用举例
在windows中启动winsshd之后,就可以在linux-windows之间传输文件了。

- linux -> windows
zhoubo@ubuntu-zhoubo:~$scp foo.txt Administrator @bzhou.net:/c/

- windows -> linux
zhoubo@ubuntu-zhoubo:~$scp zhoubo@bzhou.net:/e/bar.txt ~/

- local -> remote
zhoubo@ubuntu-zhoubo:~scp foo.txt zhoubo@d.bzhou.com:~/tmp/

- remote -> local
zhoubo@ubuntu-zhoubo:~scp zhoubo@d.bzhou.com:~/tmp/foo.txt  .

说明:
bzhou.net       XP           192.168.22.26
u.bzhou.com   Ubuntu    192.168.22.67
d.bzhou.com   Debian    192.168.22.169

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值