ssh : Permission denied (publickey,gssapi-with-mic)
Setting 700 to .ssh and 600 to authorized_keys solved the issue. chmod 700 /root/.ssh chmod 600 /root/.ssh/authorized_keys
Setting 700 to .ssh and 600 to authorized_keys solved the issue. chmod 700 /root/.ssh chmod 600 /root/.ssh/authorized_keys
1) Assuming you connect from home to foo, you need a reverse tunnel (-R) ssh -R 8080:localhost:3000 foo.mycompany.com This will enable processes running at foo to connect to localhost:8080 and actually speak to your home computer at port 3000. If you want other computers at your work to be able to connect to foo:8080 and … Read more
The rhc command-line tools come with the global option -l, –rhlogin LOGIN. You have two options: Use the -l flag with every command to specify the login name: rhc app create <appname> <cartridge> [-l <login1/login2>] Run rhc setup -l LOGIN between the sessions. Once done managing apps from one account you can end the session … Read more
Copy the public key to clipboard. Linux ssh-keygen -f private.pem -y | xclip MacOS ssh-keygen -f private.pem -y | pbcopy Save to file ssh-keygen -f private.pem -y > public.pub Note that if your permissions are vague on the .pem file, then ssh-keygen will generate an empty .pub file. You can usually fix this with: chmod … Read more
You can use Ruby’s core File module, like so: config.vm.provision “shell” do |s| ssh_pub_key = File.readlines(“#{Dir.home}/.ssh/id_rsa.pub”).first.strip s.inline = <<-SHELL echo #{ssh_pub_key} >> /home/vagrant/.ssh/authorized_keys echo #{ssh_pub_key} >> /root/.ssh/authorized_keys SHELL end This working example appends ~/.ssh/id_rsa.pub to the ~/.ssh/authorized_keys of both the vagrant and root user, which will allow you to use your existing SSH key.
Here’s how to do Richard Christensen’s answer as a one-liner, no file editing required (replace capitalized with your own settings, PROXYPORT is frequently 80): ssh USER@FINAL_DEST -o “ProxyCommand=nc -X connect -x PROXYHOST:PROXYPORT %h %p” You can use the same -o … option for scp as well, see my superuser answer. If you get this in … Read more
The answers here are terrible advice. You should never turn off StrictHostKeyChecking in any real-world system (e.g. it’s probably okay if you’re just playing on your own local home network – but for anything else don’t do it). Instead use: ssh-keygen -R hostname That will force the known_hosts file to be updated to remove the old … Read more
It’s a solution for Ubuntu (the idea also works for Windows or Mac) I just tried today and it works like a charm. Material a cross-over Ethernet cable (the name is fancy but it’s just a normal Ethernet cable) a laptop (ubuntu) a Raspberry Pi (I have the Pi2) Prerequisites on your ubuntu Install network-manager … Read more
OK, there was a small typo in my key. Apparently when pasting to file the first letter was cut off and it started with sh-rsa instead of ssh-rsa. nrathathaus – your answer was very helpful, thanks a lot, this answer is credited to you 🙂 I did like you said and set this in sshd_conf: … Read more
You can set IdentityFile flag file in ~/.ssh/config file as follows: Host bitbucket.org IdentityFile ~/.ssh/id_rsa When you run ssh git@bitbucket.org the ssh client allows you to selects a file from which the identity (private key) for RSA or DSA authentication is read. SSH Client To Use Given Private Key ( identity file )