代码之家  ›  专栏  ›  技术社区  ›  bentford Marko Hlebar

如何使用linux命令行ftp和@登录我的用户名?[闭门]

  •  24
  • bentford Marko Hlebar  · 技术社区  · 17 年前

    当我的用户名具有 @

    ftp -u user:password@host/destination_folder/ sourcefile.txt
    

    我的用户名是 info@domain.com 它认为我的主人是 domain.com

    注意:这是一个无人参与的上传,所以我不能只键入用户名和密码。

    7 回复  |  直到 12 年前
        1
  •  25
  •   Angus S-F    15 年前

        2
  •  23
  •   pts    12 年前

    或者,如果不想创建配置文件,请使用 curl 而不是 ftp

    curl -u user:password -T file ftp://server/dir/file
    
        3
  •  12
  •   Cristian Ciupitu    12 年前

    请尝试在中定义帐户 ~/.netrc 文件如下:

    machine host login info@domain.com password mypassword
    

    man netrc 详情请参阅。

        4
  •  6
  •   Zearin lifeisstillgood    12 年前

    ftp hostdomain.com 下一个提示要求我输入一个名称,如果它与我当前的用户不同的话。

    我想这取决于FTP的配置方式。也就是说,它是采用相同的用户名(如果未提供)还是询问。好消息是,即使没有解决方案,下次你面对这个问题时,它也可能对你有效:D

        5
  •  2
  •   Stephen    14 年前

    使用curl而不是ftp执行无人参与的上载:

    curl -u user:password -T file ftp://server/dir/file
    

    [~]# ftp domain.com
    ftp: connect: Connection refused
    ftp> quit
    [~]# ftp some_user%40domain.com@domain.com
    ftp: some_user%40domain.com@domain.com: Name or service not known
    ftp> quit
    

    [~]# ftp domain.com
    Connected to domain.com (173.254.13.235).
    220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
    220-You are user number 2 of 1000 allowed.
    220-Local time is now 02:47. Server port: 21.
    220-This is a private system - No anonymous login
    220-IPv6 connections are also welcome on this server.
    220 You will be disconnected after 15 minutes of inactivity.
    Name (domain.com:user): some_user@domain.com
    331 User some_user@domain.com OK. Password required
    Password:
    230 OK. Current restricted directory is /
    Remote system type is UNIX.
    Using binary mode to transfer files.
    
        6
  •  1
  •   Dennis Comeaux    15 年前

    curl-f-s——禁用epsv-usomeone@somewhere.com:gr8p455w0rd-T/some/dir/filename ftp://somewher.com/ByramHealthcareCenters/byram06-2011.csv

        7
  •  -3
  •   Stephan    13 年前

    我从来没见过这张照片 -u 参数但是如果你想用“@”,那么把它说成“\@”怎么样?

    这样的话,它应该被理解为你想要的。你知道什么吗

    ftp -u user\@domain.tld@ftp.host.tld