chunjihong 发表于 2015-12-31 11:39:00

Mac os x 10.7以后的版本,使用ftp

  
  mac os x 10.7以前的版本可以在
  system preference
  里面找到
  sharing
  然后enable
  ftp server
  就可以了,但是后来的版本apple把这个前端的配置给去掉了,不知道为什么,但是并不是说mac就不带ftp server了。要使用它的需要从命令行先启用它。
  
  
  sudo -s launchctl load -w /System/Library/LaunchDaemons/ftp.plist
  
  然后可以在本机先测试,
  ftp localhost
  
  如果你看到下面的画面说明启动成功。
  $ ftp localhost
Trying ::1…
Connected to localhost.
220 ::1 FTP server (tnftpd 20100324+GSSAPI) ready.
Name (localhost:Paul):
  如果想停止ftp服务,使用
  sudo -s launchctl unload -w /System/Library/LaunchDaemons/ftp.plist
  
  其实,除了ftp,我们有一个更好的选择就是sftp,其实secure ftp,比ftp更安全。只要enable了remote login就可以了
  system preference -> sharing->remote login
  
  其实当你enable这个选项的时候,你开启了2个服务,sshd和sftpd
  
  然后使用下面的命令测试:
  sftp localhost
  
  
  原地址:http://blog.360converter.com/archives/1224
页: [1]
查看完整版本: Mac os x 10.7以后的版本,使用ftp