搜索
linux运维 - linux 软件ftp如何保存用户名和密码使自己能够快速登录?
阿神
阿神 2017-04-17 12:06:16
[Linux讨论组]

原来一直用这样的流程,应该可以简化吧?

ftp 网址
输用户名
输密码
阿神
阿神

闭关修行中......

全部回复(2)
PHPz
  • ftp ftp://username:password@ip:port
  • ftp http://username:password@ip:port

以下是 ftp --help 的文档。

 ~/ ftp --help
ftp: illegal option -- -
usage: ftp [-46AadefginpRtvV] [-N netrc] [-o outfile] [-P port] [-q quittime]
[-r retry] [-s srcaddr] [-T dir,max[,inc]]
[[user@]host [port]] [host:path[/]] [file:///file]
[ftp://[user[:pass]@]host[:port]/path[/]]
[http://[user[:pass]@]host[:port]/path] [...]
ftp -u URL file [...]

巴扎黑

http://unix.stackexchange.com/a/28440

可以使用 ~/.netrc

示例

machine 192.168.0.1
login ftpuser
password ftpuser_password  

这样以后你每次 ftp 192.168.0.1 的时候,系统都会帮你以用户名ftpuser登录到该服务器。

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板