dotmindlabs
dotmindlabs

Reputation: 908

FTP from command-line to IIS FTP Server username special character

From Ubuntu terminal, i'm trying to ftp an IIS ftp server.

username: jenkins.a.b.c|jenkins

host: a.b.c

due to the special character '|' i tried the following, but did not succeed:

ftp jenkins.a.b.c%[email protected]

ftp: jenkins.a.b.c%[email protected]: Name or service not known

note: by using ftp interactively, defining the host, connecting and than defining the username and password, i am able to log on.

Upvotes: 0

Views: 327

Answers (1)

dotmindlabs
dotmindlabs

Reputation: 908

Okay, i was able to login, turning off the interactive mode and escaping the pipe character - used for user IIS ftp user isolation, based on a thread of LinuxQuestions.org:

#!/bin/bash

HOST=a.b.c
USER=jenkins.a.b.c\|jenkins
PASS=xxxxxxxxx

# -i turns off interactive mode

ftp -inv $HOST << EOF

user $USER $PASS

.
.
.
ftp operations (ex. cd /folder/folder)
.
.
.

bye
EOF

Upvotes: 1

Related Questions