Is there a way to store my password when ssh'ing on a server? I tried to change the variables BatchMode and PasswordAuthentication in my file /etc/ssh/ssh_config, but to no avail. Could someone indicate me how to proceed?
80027
I want to communicate between several computers on my network (static Ethernet), through SSH. In order to do that I need to run ssh-add every time I log in on a specific machine, how can I do it so that it's set up once and it doesn't ask me for the passphrase every time I log in or reboot my machine?  I know that there is a way that you should add some lines to the bash_profile file, but I still need to type the password every time I reboot/log in to a specific machine.  if [ -z "$SSH_AUTH_SOCK" ] ; then     eval `ssh-agent -s`     ssh-add fi
31361
Is there a way to configure a password for a stored session in ?  I know there is the capability to specify an "auto-login username" (under Connection/Data), but is there a way to do the same with the password?
15332
I have a remote server. I planned to use public keys to connect over ssh without typing the password but the remote system rejects public key authentication.  So what is the best way to do it? What about using sshpass?
102710
I’ve asked some web hosting providers (Bluehost and Dreamhost) and they both said that on shared hosting accounts they have no way to disable login via SSH with a password. What this means is that even if we set up SSH keys, logging in without them and via the hosting’s password will always be enabled, pretty much negating most of the advantage for the keys.  From what I can find online, editing /etc/ssh/sshd_config is the way to go do disable login via a password, but since it’s shared hosting, that’s not a possibility.  All that said, they never claimed it can’t be done (though I haven’t found a way), just that they don’t support it. Is there a way to do it on a per-user basis, so that I can set it up myself? And if not, why not, what is the (technical/design) limitation in the way SSH works that prevents it?
45515
I need to use another computer to access my ssh server. This is because a recently implemented vpn at my university doesn't work on my current computer and I have lost access to the server.   I ssh via encrypted ssh keys. Can I copy these keys to the new computer (on which the vpn works). I tried copying the id_rsa and id_rsa.pub files in the ~/.ssh folder but it doesn't recognize the keys and there is no prompt to input a password to decrypt the keys.   EDIT: I can't access the server to generate a new key pair for the new computer and am out of the country so can't physically access it.   Thanks.
70271
So I set up passwordless ssh using the following:   After setting this up, I'd expect that I wouldn't need a password to ssh.  My issue is that on my first connection to ssh, it will ask me for a password, but additional sessions on top of that will not ask for a password.    I've already checked my sshd_config to make sure that it contains:  RSAAuthentication yes PubkeyAuthentication yes AuthorizedKeysFile  %h/.ssh/authorized_keys   Pretty sure my permissions are right, because if they weren't then passwordless ssh wouldn't be working at all.  To add more "fun" to this problem, I noticed that when I restart my computer (either the client computer or the ssh server computer), sometimes it will work.  Then when I shut down the computer and try it again the next day, it doesn't work anymore.  Maybe this is completely random, but it's something I've noticed.
89024
I lost my password to a VM running 11.04, but have ssh access via public key authentication.  Is there any way I can reset the password without a reboot? (This is to avoid downtime of services it's running.)
70572
I have created a .bat file which automatically takes the SSH server (Jump Server) access. Now, I have couple of commands which I would like to hit in that window.  For an ex. (To take root access)  usrun -u root rush   With this command, it'll ask me to enter the password.  So, how can I achieve this entirely through .bat file?
726
I'm having some issues SSH'ing to a server when logged into a particular VM.  From my local PC, I can log in to the server just fine using the command ssh -i .ssh/[my private key] username@domain.  If I then SSH into another unrelated server which also has the same private key and run the above command it will also log in just fine in to the server.  But, when I SSH into a particular OpenStack VM (again has the same private key) on the unrelated server and then SSH in to the server from there I start getting prompted for a passphrase. But a passphrase hasn't been set for the key so inevitably I get a "Permission denied (publickey)." error.  To double check, I removed the private key from the VM and scp'd the private key from my PC into it again and tried the same command I still get prompted for a passphrase.  In other words:   PC - SSH - Server1 = Works fine  PC - SSH - Server2 - SSH - Server1 =     Works fine  PC - SSH - Server2 - SSH - Virtual Machine - SSH - Server 1 =         Asks for a passphrase   What could be the reason behind this? It's definitely the right private key I'm using and it has the appropriate permissions.  Edit - Output of ssh -v -i .ssh/[my private key] username@domain as requested  OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017 debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 58: Applying options for * debug1: Connecting to xxx.xxx.xxx.xxx [xxx.xxx.xxx.xxx] port 22. debug1: Connection established. debug1: key_load_public: No such file or directory debug1: identity file /.ssh/[my private key].ppk type -1 debug1: key_load_public: No such file or directory debug1: identity file /.ssh/[my private key].ppk-cert type -1 debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_7.4 debug1: Remote protocol version 2.0, remote software version OpenSSH_7.2p2 Ubuntu-4ubuntu2.4 debug1: match: OpenSSH_7.2p2 Ubuntu-4ubuntu2.4 pat OpenSSH* compat 0x04000000 debug1: Authenticating to xxx.xxx.xxx.xxx:22 as '[my username]' debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: algorithm: curve25519-sha256@libssh.org debug1: kex: host key algorithm: ecdsa-sha2-nistp256 debug1: kex: server-&gt;client cipher: chacha20-poly1305@openssh.com MAC: &lt;implicit&gt; compression: none debug1: kex: client-&gt;server cipher: chacha20-poly1305@openssh.com MAC: &lt;implicit&gt; compression: none debug1: kex: curve25519-sha256@libssh.org need=64 dh_need=64 debug1: kex: curve25519-sha256@libssh.org need=64 dh_need=64 debug1: expecting SSH2_MSG_KEX_ECDH_REPLY debug1: Server host key: ecdsa-sha2-nistp256 SHA256:ZiugTjR5fM0E3evOwHoePFKspDQChA0Ab6L0q88KP/g debug1: Host 'xxx.xxx.xxx.xxx' is known and matches the ECDSA host key. debug1: Found key in /home/centos/.ssh/known_hosts:2 debug1: rekey after 134217728 blocks debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug1: rekey after 134217728 blocks debug1: SSH2_MSG_EXT_INFO received debug1: kex_input_ext_info: server-sig-algs=&lt;rsa-sha2-256,rsa-sha2-512&gt; debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: publickey debug1: Next authentication method: publickey debug1: Trying private key: /.ssh/[my private key].ppk Enter passphrase for key '/.ssh/[my private key].ppk': Enter passphrase for key '/.ssh/[my private key].ppk': Enter passphrase for key '/.ssh/[my private key].ppk': debug1: No more authentication methods to try. Permission denied (publickey).
95110
Are saved Remote Desktop credentials secure (loosely speaking) on the local machine? They aren't stored as clear text anywhere at least, are they?  Edit: I understand the inherent risks of saving passwords. Certainly though there is a spectrum of effectiveness, for instance saving a password through something like  () is obviously better than saving a password in clear text.
77998
This is the first time it has happened to me where I am using the su command and it actually displays the password on the terminal and doesn't stay hidden. Here is my code snippet:   sshpass -p "password" ssh -q username@74.11.11.11 "su -lc 'mkdir temp/'"   Code explanation:  I am accessing a remote server and trying be root on that server to create a folder. In doing so I have to use the su command and it prompts me for the password. When I enter the password, it gets displayed and doesn't stay hidden. How do I fix that?
31871
How do I add "-X" into my ssh default option? i.e., when I type ssh A.B.C.D, it should really do ssh -X A.B.C.D  I can alias it, but is there a more "elegant" solution to do that in .ssh/config file?
108833
If I SSH to a remote server, is it be possible for the admins of that machine to use my SSH session to send data back down the connection and do something to my local PC? I use DSA keys and do not allow password logins to my SSH server, and I do not allow root access. If it would still be possible despite these precautions,  could you explain how it is done with code/links so I can understand?  Another thing I am worried about is that if I connect to the remote server, the admins may be able to hijack my pts session and simply type exit to get to my PC. Again, please let me know if this is possible and if so please provide code/links  I've done a bit of googling and turned up nothing so far.
89504
I have created alias for username and it works fine   alias yb="ssh name@hostname"   It works fine, but I also want to create alias for password, Can anyone help how can I do this?
105305
why should root access be disabled for ssh? I always hear that's for security reasons. But I don't get it. What's different to login as non-root and then sudo su -? What's the preferred way to handle tasks that need privileged permissions?  Thanks  Thomas
89358
What am I missing?  I change the root password on a unix machine, then try to log in with that password.  PasswordAuthentication is set to yes in sshd_config and the sshd daemon has been restarted.  This behavior happens whether I log in remotely or locally:  root@ip-10-0-0-155:~# passwd Enter new UNIX password:  Retype new UNIX password:  passwd: password updated successfully root@ip-10-0-0-155:~# ssh root@127.0.0.1 root@127.0.0.1's password:  Permission denied, please try again. root@127.0.0.1's password:
79709
I tried to create a user with password via ssh (with root permission) like this:  ssh root@123.45.6.7 useradd -p $(openssl passwd -1 1234) newuser   By doing so, I could successfully create an account named newuser, but I couldn't login with the expected password (which is 1234)  It makes no difference if I add double quotes:    ssh root@123.45.6.7 "useradd -p $(openssl passwd -1 1234) newuser"   And then I was wondering if I can generate hashed password and save it as a variable locally, but still with no luck.  password=$(openssl passwd -1 1234) ssh root@123.45.6.7 "useradd -p $password newuser"   Is there something that I miss? Thanks in advance!