Azure FTP login via command line / batch file fails - windows

I am trying to connect by FTP to an Azure Web App. I downloaded the publish profile and copied the login to my FTP client and can connect successfully. But when i use ftp.exe from Windows then i am not able to connect to the same host with the same credentials.
I have read Connecting to Azure website via FTP but those solutions do not fix my problem.
This is the output:
C:\Projects>ftp
ftp> open waws-prod-am2-201.ftp.azurewebsites.windows.net
Connected to waws-prod-am2-201.drip.azurewebsites.windows.net.
220 Microsoft FTP
Service 200 OPTS UTF8 command successful - UTF8 encoding now ON.
User (waws-prod-am2-201.drip.azurewebsites.windows.net:(none)): firstserver\$firstserver
331 Password required
Password:
530 User cannot log in.
Login failed.
Invalid command.
Also tried with username firstserver from the Windows command prompt, no difference. Do not forget: when logging in via commercial FTP client software I CAN login successfully.
I tried backslashing the backslash and/or the dollar sign, but nothing helps. What is going wrong, how do i login from the command prompt using the Windows default ftp.exe?

If you run ftp in debug mode (-d switch), you will see that it truncates the password to 32 characters. That's why the connection fails.
Try using a shorter password. Otherwise you will have to use another command-line FTP client.

Related

cmd command "runas" equivalent in MacOS

i am facing an issue while using the mac. I need to use that PowerShell command on my mac to run application as domain user
runas /netonly /user:user_name "C:\Users\fwa\AppData\Local\Programs\Azure Data Studio\azuredatastudio.exe"
I have tried
sudo -u user_name /Applications/AzureDataStudio.app
it asks password for local user. but in my case user is on External domain
To run Azure Data Studio (ADS) on your mac and login to SQL Server using Windows authentication instead of a username/password, you use the kinit command. I've had best luck using the kinit command through the built-in command window in ADS (you'll be prompted to do so if/when your login fails). Note that your computer needs network access to a kerberos server.
There's some further information about setting this up HERE and HERE.

Piping password to kinit on a windows server

We are setting up a system where we need to re-verify a user's identify before he/she is allowed to perform a specific task. The user enters his/her password into the website, and then PHP runs kinit to verify that the password is correct. We use Kerberos for authentication. This is what we successfully tried on a Linux server:
echo "password123" | kinit username#REALM.COM
The problem is that the system is running on a Windows server. We have installed kinit, but cannot seem to get the same thing to work. Running that same command, with or without the quotes, just gives us this output:
kinit: Generic preauthentication failure while getting initial credentials
Any suggestions on what could be done here?
Edit:
Running simply "kinit" and then entering the password at the prompt, works well.

FTP connection command fails

Ftp via Terminal works perfectly if you use the command prompts like this:
Ftp
open
enter hostname
enter username
enter password
But if you attempt to open a connection like this:
ftp ftp://username:password#hostname/path
End up with:
Trying 23.102.24.18...
Connected to waws-prod-db5-091.drip.azurewebsites.windows.net.
220 Microsoft FTP Service
331 Password required
530 User cannot log in.
ftp: Login failed
ftp: Can't connect or login to host waws-prod-db5-091.drip.azurewebsites.windows.net
221 Goodbye.
Any idea why?

Downloading a file from FTP using kettle

I was trying to download a file form FTP server(Remote machine) using pentaho kettle (Get a file with FTP), I can able to do that in my local machine. But when i try to deploy the app in jboss web server it fails to download resulting in a error "Error getting files from FTP : Login incorrect."
But everything seems to be correct regarding the login details.
Did i have configure any where else in the server? Please help.
There are several things you could check in this case:
Check that the security settings of the remote FTP server allows for the machine that runs the job to establish an FTP connection. If you have access to the server, try the following command to ensure that the server has access:
telnet <your-remote-ftp-server-host> 21
# Or try:
telnet <your-remote-ftp-server-host> 22
Verify that the remote FTP server respects FTP connection requests, otherwise try SFTP (Get a file with FTP & Get a file with SFTP are two entirely different job steps in Kettle)
Wherever you are fetching your FTP credentials from (ideally a configuration file), test that the credentials are properly read by the job in the relevant scope - use the Write To Log step for that matter

In SVN how do I override automatic Windows domain authentication

I have a build server that is not part of a Windows domain trying to connect to a VisualSVN server running HTTPS via apache with domain login via Active Directory. When I try to connect to the server using specifying a domain username I observe a client hang:
svn ls --username=domainuser https://subversion.mydomain/svn/repo1/
The logs on the server show Windows authentication failures using the login-name for the build-machine, and the build-machine's hostname in the Domain name field. The username provided on the command-line is completely ignored.
SVN Client: TortoiseSVN commandline tools: svn, version 1.8.1 (r1503906)
On a separate machine (on the domain) - I found that the --username would not be ignored if I used the cygwin svn instead.
The solution I found was to disable the http-auth-type 'negotiate'. This prevents Windows credentials being automatically shared.
I verified this using a command-line override, it asked for password for the user on the command-line:
svn ls --username=domainuser --config-option servers:global:http-auth-types=basic;digest https://subversion.mydomain/svn/repo1/
Authentication realm: <https://subversion.mydomain/svn/repo1/> VisualSVN Server
Password for 'domainuser':
(Note for Cygwin users: If you use SVN under Windows via Cygwin then you will need to add quotes to your command like this: $ svn ls --username=domainuser --config-option "servers:global:http-auth-types=basic;digest" https://subversion.mydomain/svn/repo1/ -- Otherwise the semicolon will be treated as a command delimiter.)
To configure this more permanently you can make a servers config file entry for all matching servers. For Win7 that's C:\Users\<User>\AppData\Roaming\Subversion\servers.
[groups]
mydomain = *.mydomain
[mydomain]
http-auth-types=basic;digest
Instead of disabling negotiate in client's config, I'd suggest using Windows Credential Manager to store the other account's credentials for Single Sign-On.
The following instruction shows how to put other domain credentials to access VisualSVN Server into Windows Credential Manager:
Start | Control Panel | Credential Manager,
Click 'Add a Windows Credential',
As 'Internet or network address' enter the FQDN of VisualSVN
Server's machine,
As 'Username' enter the <DOMAIN>\<username> of user account that
exists in domain and has access rights to VisualSVN Server,
Complete the password field and click OK,
Verify that you can authenticate to VisualSVN Server under the selected user account after completing the above steps.

Resources