Opening session in PuTTY from WinSCP stops at "Login as" prompt instead of using credentials from WinSCP - putty

I'm facing strange issue with WinSCP: It works well and I'm able to connect to remote hosts. But when I try to use the "Open session in PuTTY", instead of logging me directly with same credentials, PuTTY gets "stuck", prompting me to "login as".
I've checked the config in WinSCP and it looks fine: "Remember session password and pass it to PuTTY" is ticked.
What else should I check?
I'm using WinSCP 4.2.7 and PuTTY 0.60.3.

As documented:
By default, WinSCP creates temporary site settings for PuTTY (under the name "WinSCP temporary session"). The site settings will contain only the options known by WinSCP, mostly connection options. It will particularly lack any terminal options, so the defaults (Default Settings profile) will apply.
If you want to configure your own options, you can save PuTTY site settings with the same name as a WinSCP site. WinSCP will then instruct PuTTY to open that session (It will not export any settings, nor a connection options).
So if you have an invalid stored session in PuTTY with the same name as your WinSCP stored site, the "Open in PuTTY" function won't work, as it tries to open that invalid site.
Side note: You are using an obsolete and insecure versions of WinSCP and PuTTY. You urgently need to upgrade!

WinSCP is somehow looking into PuTTY saved sessions that are configured. I had a saved session in PuTTY with same name as in WinSCP ("myApplication - integration"). Somehow, when the session already exist in PuTTY, WinSCP is not able to log me in directly to PuTTY.
I deleted the saved session from PuTTY, and it worked: now WinSCP logs me in directly in PuTTY. And now I see a "WinSCP temporary session" in the list of saved session in PuTTY.

We need provide putty path
Right click the putty icon in WinSCP then go to Queue -> Customize -> Application
then provide your putty.exe path using browse button
then click ok
Now click the putty icon button from WinSCP, Putty will open automatically :)

In WinSCP Go to :
preferencce - > integration -> application
under "putty/terminal client path" add this line :
%ProgramFiles%\PuTTY\putty.exe -t -m "%TEMP%\putty.txt" !cmd.exe /c echo cd '!/' ; /bin/bash -login > "%TEMP%\putty.txt"

Related

Delete putty "Default Settings" modification to original

I'm using putty to access linux bash. I have overwritten the "Default Settings" with some modification.
How can I set the defaults back to the original?
I found a solution with regedit.
All sessions are in the registry under:
Computer\HKEY_CURRENT_USER\SOFTWARE\SimonTatham\PuTTY\Sessions
There I delete the session "default%20settings".
Locate where putty.exe is installed. Open command prompt. Type putty.exe -cleanup
Thats it

Command line option to download file in FileZilla

I am using FileZilla (GUI) to download files from an FTP server. Can any one tell me a command line argument to download file from FTP server to local file system?
FileZilla does not have any command line arguments (nor any other way) that allow automatic transfer.
See:
FileZilla Client command-line arguments
https://trac.filezilla-project.org/ticket/2317
Though you can use any other FTP client that allows automation.
Built-it Windows ftp.exe (use its get command).
Though Windows ftp.exe does not support a passive mode, what makes it useless nowadays, when connecting over Internet due to ubiquitous firewalls and NATs.
WinSCP: You can automatically make it download a file both in GUI and scripting mode
GUI:
winscp.exe ftp://user:password#host/path/file.ext
You will get a dialog, where you select a directory to download the file to.
See https://winscp.net/eng/docs/commandline
Scripting (put the command to a .bat file):
winscp.com /command ^
"open ftp://user:password#host/" ^
"get /path/file.ext c:\" ^
"exit"
See https://winscp.net/eng/docs/guide_automation
The WinSCP can even generate a script from an imported FileZilla session.
For details, see a guide to FileZilla automation.
(I'm the author of WinSCP)
FileZilla does support some basic command line options for the upload and download of files. Not all options are documented.
You can download a file with the option "-d sourcefile targetdir"
Example (download):
filezilla.exe -d ftp://user:pass#ftp.myserver.com/folder/* "c:\downloads\" ​ /overwrite /close
Example (upload):
filezilla.exe -u "c:\temp\samplefile.exe" ​ftp://user:pass#ftp.myserver.com/folder /overwrite /close
/close -- will close the GUI after the download/upload completes
/overwrite -- will overwrite the files in target without prompting the user
You can also connect to a site from the site manager e.g. --site="0/site1".
Below are reference sites with further examples including download links to FileZilla versions (2.32 / 3.1) that supported the feature.
FAQ Link
FileZilla Download link

How to run .rdp file in Mac OSX?

I have installed Microsoft Remote Desktop 8.0.5 For MAC OSX 10.8.5 and added new remote connection in the list which works fine.
Now i export same connection to .rdp file but when i execute it mstsc opens remote os login screen and asks for user password to login (which is already in keychain store).
how can i launch .rdp file so that it will not ask remote user password?
where/how to store password?
------- .RDP File ----------
screen mode id:i:0
use multimon:i:1
session bpp:i:32
full address:s:192.168.1.130
audiomode:i:0
username:s:mylabs\administrator
disable wallpaper:i:0
disable full window drag:i:0
disable menu anims:i:0
disable themes:i:0
alternate shell:s:
shell working directory:s:
authentication level:i:0
connect to console:i:0
gatewayusagemethod:i:0
disable cursor setting:i:0
allow font smoothing:i:1
allow desktop composition:i:1
bookmarktype:i:3
use redirection server name:i:0
Thanks in advance
This article helped me
https://serverfault.com/questions/962628/failure-connecting-to-a-cyberark-managed-server-using-macos
Use Microsoft RDP Client for Mac starting from version 10.2.2
Run the following command on the Mac Terminal
defaults write com.microsoft.rdc.macos ClientSettings.EnforceCredSSPSupport 0
Close terminal and try to connect

PuTTY fatal error: "No supported authentication methods available"

PuTTY fatal error:
No supported authentication methods available
When I tried to login into the production server, I am getting above error. Could anyone help me to fix this?
Edit file
sudo vi /etc/ssh/sshd_config
Set PasswordAuthentication yes
Then restart server
sudo service ssh restart
sudo service sshd restart
It worked for me after I did the following steps :
1- Download Puttygen (https://www.puttygen.com/download-putty)
2- Open PUttyGen and then Load the private key from :
C:\Users[username]\Chapter6.vagrant\machines\default\virtualbox
3- save the new private key with a new name.
4- Open Putty, go to Connection > SSH > Auth > and add the new private key
5- Connect now using 127.0.0.1 and 2222
I think your private key file format is not compatible with putty for putty uses its' native format instead.
Detail:http://tartarus.org/~simon/putty-snapshots/htmldoc/Chapter10.html#errors-no-auth
If you are using cloud service and trying to connect server using ssh then Don't login the user name as ec2-user, the default user name is ubuntu forubuntu server.
This error can also be seen if you haven’t selected the .ppk file for the session in Putty: Connection > SSH > Auth
You’re done if you’ve employed PuttyGen to generate the keys. Else import the private key to your .ppk file as others have instructed.
Note on Linux as opposed to Windows, puttygen is accessed only via the command line. Here’s some resources for that:
https://the.earth.li/~sgtatham/putty/0.76/htmldoc/Chapter8.html#pubkey
http://manpages.ubuntu.com/manpages/bionic/man1/puttygen.1.html
https://www.ssh.com/academy/ssh/putty/linux/puttygen
In my case, I updated the Putty application to the latest and issue was solved.
Do you still have access to the server (maybe an open shell?) Check /var/log/messages for more details. This could have something to do with your PAM configuration.
Did you change folder permissions? i met this question in this week, so i find the error that is cause to me change the folder(name is ec2-user) permission.
1.Edit the /etc/ssh/sshd_config file.
2.Change PasswordAuthentication and ChallengeResponseAuthentication to yes.
3a. Restart ssh /etc/init.d/ssh restart.
OR
3b. better you use service sshd restart
If you've saved your public key on an external drive and it's not connected, putty will throw this error when connecting to your remote server.
Solved via Puttygen
I was on a windows system and it doesnt support direct shell access like linux or macOS.
Download Puttygen.
Load the .pem key to puttygen
Save as Private key
Use this key to login to ec2 instance
P.S : Also if the SSH ask for login/username - enter ubuntu or admin
Download Puttygen
Load the .pem key to puttygen
convert .pem file to .ppk
Save as Private key
Install/Open Putty >> puTTY Configuration >> Auth >> Browse >> path to .ppk file
Use this key to login to ec2 instance (check that IP of remote server is allowed in security group config of EC2 instance)
Username
The usual user names are ec2-user, ubuntu, centos, root, or admin
If that server is in the cloud like AWS, the rookie mistake I did was not realizing that a new Public IPv4 DNS gets used when the instance was off for some time. So, check the new DNS
Today I faced the same problem. So in putty you have to use "user name" of your EC2 instance
to get your "user name" of your EC2 instance
Select EC2 instance
select Connect
Now go to putty use ec2_name#public address
To see your public address
select EC2
under details you will be able to see your public address.
Now try loading your "ppk" file you will be able to log in.
For Digital Ocean, we should enable password authentication first.
The complete instruction is here: https://docs.digitalocean.com/support/i-lost-the-ssh-key-for-my-droplet/#enable-password-authentication
Log in to the Droplet via the Recovery Console
Even though you have a root password for the Droplet, if you try to log in via SSH using that password immediately, you’ll receive a Permission denied (publickey) error. This is because password authentication is still disabled on the Droplet. To fix this, you need to log in via the Recovery Console and update its SSH configuration.
There are detailed instructions on how to connect to Droplets with the
Recovery Console for a more explicit walkthrough, but here’s a brief
summary:
On the Droplet’s detail page, in the same Access tab, click the Launch
Console button.
At the login prompt, enter root as the username.
At the subsequent password prompt, enter the root password you were
sent via email. Most distributions prompt you to enter the password
twice, but some (like Fedora 27) do not.
Enter a new root password to replace the one that was emailed to you,
then enter that same new password again.
You will now be logged in as root in the Recovery Console, which gives
you access to the Droplet’s SSH configuration.
Enable Password Authentication To enable password authentication on
your Droplet, you need to modify a line in its SSH config file, which
is /etc/ssh/sshd_config.
Open /etc/ssh/sshd_config using your preferred text editor, like nano
or vim. Find the line that reads PasswordAuthentication no line and
change it to PasswordAuthentication yes, then save and exit the file.
Because the SSH daemon only reads its configuration files when it’s
first starting, you need to restart it for these changes to take
effect. The command to do this depends on your operating system:
Operating System SSH Restart Command
Ubuntu 14.x service ssh restart
Ubuntu 15.4 and up systemctl restart ssh
Debian systemctl restart ssh
CentOS 6 service sshd restart
CentOS 7 systemctl restart sshd
Fedora systemctl restart sshd\

How do you set up an FTP server on a computer?

Furthermore, how do you check a server to see if an ftp server is running on it?
Consider the following steps
Press Win+R
type inetmgr and press enter
it opens IIS
expand the list and if you find "FTP Sites" folder available then FTP is installed in your system
to check if ftp server is running or not expand "FTP sites" folder
u will find a sub directory "Default FTP Site".
right click on that subdirectory and you will find 'start','stop' and 'pause' options available there
if start option is disabled then ftp server is running on your system
you can also start it if not already started
To install FTP. just go to Add/Remove windows component and re install IIS with FTP services and you r done
to check ftp if ftp server is running or not on a remote computer
open your cmd and type ftp and press enter. then use command "open 172.25.65.788" or u can use your own ip address. if it asks for username and password that means server is running.
Just open your favorite ftp client, specify server url and click connect. If connection successful then ftp is installed and started on a server.
You can do even from windows console, just type something like (open Run dialog by pressing Win+R): cmd /K ftp {serverurl}

Resources