Input password for putty pscp - copy

I'm trying to execute below command using Putty pscp tool.
pscp -v -pw mypassword "X:\data\temp*" root#172.x.x.x:\tmp\data
I'm getting following error.
Fatal: Disconnected: No supported authentication methods available
I have to pass user name and password. And on target system I don't have much of control.
Could anybody point out what I'm doing wrong?

The remote server might be rejecting ssh with a password. You could try to set up DSA or RSA keys with puttygen but you would need to change the key on the remote site. Does this work with ftp? Root login might also be disabled, and besides its usually a bad idea. That is why someone suggested that this go to the superuser forum. Root is not a regular user and remote login might be disabled in /etc/sshd_config.

Changed
...
PermitRootLogin no
...
PasswordAuthentication no
...
To
...
PermitRootLogin yes
...
PasswordAuthentication yes
And it worked!

Related

I can’t login to the server as the user I’ve created

I got “Permission denied (publickey)" using:
ssh $USERNAME#my-ip
Things I’ve done:
Using Public/Private Key authentication, I can login to the server as root.
I created a user in the sudo group
I confirmed that my created user has sudo priveleges as I viewed auth.log successfully (sudo cat /var/log/auth.log)
I thought it was possibly because my server was unable to identify which key to use, as I have created multiple keys, so I specified which key to use:
ssh -i /path/to/key/id_rsa $USERNAME#my-ip
I got "Permission denied (publickey)" again.
I figured it out! Turns out I was missing an 's' in 'ssh' at the beginning of my authorized_keys file in my user. :) I also matched the permissions between the root and user authorized_keys files, though not sure if this helped truly.

MySQL workbench SSH connection error [Bad authentication type(allowed_types=['publickey'])]

I have issue regarding SSH connection with my server. When i try to connect it results into error:"Bad authentication type(allowed_types=['publickey'])"
Thanks
You need to ensure that your private key is in openssh format. With puttygen you can export as Openssh. This worked for me.
Check your username and public key this can cause problem.
Attach the private key file with extension .ppk
Also verify your connection with putty.
Also check for the restriction on server.
FYI, my company uses a Yubikey and so the SSH part can be a bit mysterious. However, walking through a shell login with the yubikey yinit command, to ssh to IP (no password needed here), and finally to connecting mysql (still shell), I attempted to MySQL Workbench a few times with my different passwords to no avail.
Finally, I noticed the "SSH Key File" field and looked up where my .ssh file was -- /Users/myProfile/.ssh/
Set the "id_rsa.pub" file as it and voila!
Everything worked.

Emacs - Unable to tramp with a different username

I have the following setup in my ssh's config file:
Host my_username.remote
User my_username
HostName server.xxx.com
IdentityFile ~/.ssh/general_id_rsa
ControlMaster auto
ControlPath ~/.ssh/%r#%h:%p
Host different_username.remote
User different_username
HostName server.remote.net
IdentityFile ~/.ssh/general_id_rsa
ControlMaster auto
ControlPath ~/.ssh/%r#%h:%p
The above config works with no problem on the terminal, i.e. I can do ssh my_username.remote or ssh.different_username.remote and it will login on the remote server with the right credentials correctly.
However, when I do this in Emacs, I can login with my credentials, i.e. /ssh:my_username.remote:/, but not with /ssh:different_username.remote:/.
I should note that on my local machine I am also my_username. So the problem seems to come from using a different username.
Any thoughts on what's causing this?
I'm fairly sure Tramp will supply default values when you don't specify parameters, in which case /ssh:different_username.remote would be translated to /ssh:my_username#different_username.remote.
I would think you'd be able to use /ssh:different_username#different_username.remote, even if it's not able to pick up the automatic config.

Cannot login to server after disabling SELinux

I changed the following file in centos
/etc/sysconfig/selinux
and set it as
SELINUX=disabled
and run the reboot command.
but now I cannot login to my server. It shows the error
Permission denied, please try again.
when I login as a user and password.
How can I get back into my server.
Disabling SELinux and rebooting seems to set the UsePAM option in your sshd_config to no which explicitly does not work in RHEL:
# WARNING: 'UsePAM no' is not supported in Red Hat Enterprise Linux and may cause several problems
If you are able to detach and access the volume externally, you can set this back to yes and should be able to ssh in again.
Ok. I got the solution.
when I login with domain after disabling SELinux lets say
ssh user#domain
I cannot login even with correct password
but I can login as
ssh user#ip
I don't know the reason but this actually worked for me.

Github configuration id_rsa password

For the github configuration, I have completed the steps of
1.) creating new SSH keys
2.) entering my id_rsa.pub key and thus adding the key
But during the testing stage of testing, after I entered
user$ ssh -T git#github.com
A new window (outside the terminal) opens up asking : Enter your password for "id_rsa". Where can I find this password. FYI, I am using a Mac OS 10.5.8
Even after I entered:
user$ ssh -vT git#github.com
The same new window opens up asking for the "id_rsa" password.
Please help.
While creating your ssh key in step 1), make sure to enter no passphrase for it. Otherwise the setup will be more complicated as you need to use something like ssh-agent to enter the password automatically for you.