I'm new to svn and ssh. I'm trying to do svn update of 5 repositories in my local system every 3 hours on crontab.
So, to achieve this I have setup ssh passwordless login using the below steps:
ssh-keygen
ssh-copy-id -i ~/.ssh/id_rsa.pub test#repo.test.in
I did ssh test#repo.test.in
Till here it works fine for me. I'm able to login without password.
But, when I try to do sudo svn update on the 5 repositories, it is propmpting for password.
How to make svn update without password. Is there any way that I can do update of the repositories every 3 hours on cron.
I referred to this, but could not get it.
I'm using
`Ubuntu version : Ubuntu 13.04`
OpenSSH_6.1p1 Debian-4, OpenSSL 1.0.1c 10 May 2012
I can tell you two ways of passing passwords to SVN scripts
You can use expect Click here
or
--non-interactive --no-auth-cache --username XXXX --password YYYY
Check Documentation here
Related
Recently I had to get my hard drive replaced on my work machine and thus had to reconfigure everything. As a result I had to reinstall git bash. Before I was able to ssh fine into wpengine and now I cannot.
I am able to connect via the regular windows terminal fine but when I try with git bash I am getting the "Permission denied (publickey)." error for the same exact command.
I have tried all the suggested options from wpengine and in the different questions related to this on other SE questions and nothing is working.
I am using a Windows machine on windows 10.
Here are the following things I have tried:
Regenerating the key and adding it to my user public keys again and
then waiting 24 hours.
Adding the config details to the ssh_config file in C:\Program
Files\Git\etc\ssh
Adding a config file to my /User/username/.ssh/ folder.
I have tried using the following link and adding the wpengine rsa file: https://gist.github.com/jherax/979d052ad5759845028e6742d4e2343b as well.
Any and all help would be appreciated.
My guess is there is some kind of permissions issue going on the local machine?
Why would the request from git bash terminal to wpengine look different from windows command terminal?
I did solve my issue. If it helps you please use it!
When I used the command to the ssh host with : ssh -v user#environment.wpengine.ssh.net info
I got back this among the debug errors:
debug1: Offering public key: /c/Users/USERNAME/.ssh/KEY_FILENAME RSA XXXXXXXXXXXXXXXXXXXXX explicit
debug1: send_pubkey_test: no mutual signature algorithm
debug1: No more authentication methods to try.
user#environment.ssh.wpengine.net: Permission denied (publickey).
After finding this page:
https://transang.me/ssh-handshake-is-rejected-with-no-mutual-signature-algorithm-error/
I was able to solve the issue by adding the line:
PubkeyAcceptedAlgorithms +ssh-rsa to my ssh config file.
Honestly I am not even 10% certain on WHY this worked, however, it solved my problem.
How To Connect with SSH In WPEngine
If you are having trouble connecting to SSH in WPEngine Following are the commands which I used:
ssh-keygen -t rsa -b 4096 -f c:/users//.ssh/wpengine_rsa
Add Fingerprint in WPEngine My Profile – SSH
Add Config file
Host *.ssh.wpengine.net
IdentityFile ~/.ssh/wpengine_rsa
IdentitiesOnly yes
Connect with your wordpress website (windows command prompt)
ssh environment#environment.ssh.wpengine.net
I am trying to configure a Hadoop MapReduce environment on my Ubuntu system. I created a new user called hduser and put it under a new group hadoop. I created a ssh certificate and added it to the authorized keys. But whenever I tried to connect to the localhost, I ran into trouble since it kept on asking for password rather than using the key authentication.
I got over this by adding the user hduser to the AllowUsers list in /etc/ssh/sshd_config. I was able to connect to the localhost and get the HDFS system running.
Now the problem is that the entry I made for hduser in the sshd_config file is getting removed everytime I shutdown the Hadoop servers. So, each time, before starting Hadoop processes, I have to make the entry again in sshd_config file and reload ssh. Is there any way to make the changes permanent so that I don't have to do this every time?
I also tried commenting out the AllowUsers field, but it gets automatically uncommented each time.
Thanks,
TM
Edit: I talked to the system admins and it seem that the system wide configuration management application is updating the config files every now and then. Got my Hadoop users added to their list and now things work fine.
Did you perform these steps:
$ ssh-keygen -t rsa -P ''
...
Your identification has been saved in /home/hduser/.ssh/id_rsa.
Your public key has been saved in /home/hduser/.ssh/id_rsa.pub.
...
$ cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
$ ssh localhost
These lines are from this tutorial
how to create shh-keygen and how to copy the ssh-copy in the localhost.
Cloud you do bellow commands and try the hadoop it will run.
ssh-keygen -t rsa
ssh-copy-id -i ~/.ssh/id_rsa.pub $USER#hostname
exmp(hostname= your hostname like localhost). Then it will work.
createdb foo gives an invalid password for user (my username)
I can't login with
sudo psql
How do I reset my postgres user accounts?
Is it something I can do in the hba_conf file?
EDIT:
I was beginning a Postgres tutorial and wanted to have a fresh install. I ran
brew update
brew uninstall postgresql
brew install postgresql
pg_ctl -D some/path
createdb
This could be two things: you lost/misset the password, or Postgres might be configured in a way that prevents you from logging in.
Resetting the password:
Most of the time Postgres runs as user "postgres". Try su - postgres as root, and then run psql. If that doesn't work, you'll need to figure out what user postgres is running as, and su to that user. From there you can reset the password for the user. Also, make sure that your user is allowed to log in -- the default is to disable login for a new role .
Changing the configuration:
Find the pg_hba.conf file and edit it to permit password login. This file is usually loacted in /var/lib somewhere. On my Scientific Linux server its at: /var/lib/pgsql/9.2/data/pg_hba.conf, but on my Gentoo server its at /etc/postgresql-9.3/pg_hba.conf -- so locate pg_hba.conf might help you find it. This file is usually fairly well commented, and there is a manual page for it here: http://www.postgresql.org/docs/devel/static/auth-pg-hba-conf.html.
System: MacOS, standard Jenkins installation.
I can clone repository from my user. But Jenkins - can't neither from Git, not from GitHub (my key is added to Git and GitHub). I receive: "stderr: Host key verification failed."
I've copied my key into /Users/Shared/Jenkins/.ssh - but still no luck :( Maybe I've copied it to incorrect place?
Generate ssh key from Jenkins is not an option for me.
What am I doing wrong? Thanks in advance!
This is usually related to permissions, as Jenkins' process runs as user 'jenkins'.
See here: How to run jenkins as a different user -
especially the answers of Sagar and Peter Tran .
Cheers
Like the error says, the problem (at least first) is with host key verification. The first time you connect to an ssh server, ssh client will prompt you to check and accept the host key. (Of course no-one does that, so I don't know why it bothers...)
You could
sudo -u jenkins -i
and then
ssh git#github.com
and then reply to the prompt. Alternatively you can disable host key checking. Look up StrictHostKeyChecking in man ssh_config.
I've been using Tortoise to checkout/commit to the svn repository. It is set up to use Tortoiseplink as SSH client (D:\TortoiseSVN\bin\TortoisePlink.exe -l foo -pw bar). I have now moved to a Mac (using Cornerstone) but I can't get the same sort of setup. Whatever I do, I can't get Cornerstone to connect to the repo.
Do I need to set up an ssh tunnel? And how do I do that on a Mac?
Update: screenshot of the settings needed
What you have looks correct - the only thing I can think of is that your SSH connection is not working for some reason. Have you tried just doing an SSH to the server hosting the repository? To do this, open Terminal and type:
$ ssh hostgator_username#gator123.hostgator.com
If you are prompted for a password and you can log into the machine then that is a good start - if not that suggests that something is fishy with your network setup.