首页 > linux 软件ftp如何保存用户名和密码使自己能够快速登录?

linux 软件ftp如何保存用户名和密码使自己能够快速登录?

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

ftp 网址
输用户名
输密码

以下是 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登录到该服务器。

【热门文章】
【热门文章】