내 사용자 이름에 @ 사인으로 Linux 명령 줄 ftp를 사용하는 방법은 무엇입니까? [닫은
문제
내 사용자 이름이 @
중간에 로그인 하시겠습니까?
ftp -u user:password@host/destination_folder/ sourcefile.txt
내 사용자 이름입니다 info@domain.com
그리고 그것은 내 호스트가 생각합니다 domain.com
.
참고 : 이것은 무인 업로드이므로 사용자 이름과 비밀번호를 입력 할 수는 없습니다.
해결책
대안으로, 구성 파일을 만들고 싶지 않은 경우, 무인 업로드를 수행하십시오. curl
대신에 ftp
:
curl -u user:password -T file ftp://server/dir/file
다른 팁
이것을 시도하십시오 : "@"대신 "%40"을 사용하십시오.
계정을 정의하십시오 ~/.netrc
다음과 같은 파일 :
machine host login info@domain.com password mypassword
확인하다 man netrc
자세한 내용은.
나는 단순히 입력합니다 ftp hostdomain.com
그리고 바로 다음 프롬프트는 내 현재 사용자와 동일하지 않은지 이름을 입력 해달라고 요청했습니다.
FTP가 어떻게 구성되는지에 달려 있다고 생각합니다. 즉, 동일한 사용자 이름 (제공되지 않은 경우)을 가정하는지 여부입니다. 좋은 소식은 솔루션이 없어도 다음에 직면 할 때는 당신을 위해 일할 수 있다는 것입니다 : D
더 완전한 대답은 FTP (CentOS 6에 설치된 FTP 프로그램)에서는 불가능하다는 것입니다.
참조되지 않은 프로세스를 원했기 때문에 "PTS"의 답변은 잘 작동합니다.
FTP 대신 컬로 무인 업로드를 수행하십시오.
curl -u user:password -T file ftp://server/dir/file
%40은 작동하지 않습니다.
[~]# 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 프로그램을 열고 도메인을 사용하고 요청할 때 사용자를 입력하는 것입니다. 일반적으로 암호는 어쨌든 필요하므로 대화식 특성은 문제가되지 않을 것입니다.
[~]# 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.
curl -f -s -disable -epsv -u someone@somewhere.com : gr8p455w0rd -t/some/dir/filename ftp://somewher.com/byramhealthcarecenters/byram06-2011.csv
나는 본 적이 없다 -u
매개 변수. 그러나 "@"를 사용하려면 "@"로 진술하는 것은 어떻습니까?
그렇게하면 의도 한대로 해석되어야합니다. 당신은 같은 것을 알고 있습니다
ftp -u user\@domain.tld@ftp.host.tld