New answers tagged

-1

If you are a mac user you can just use the sudo ssh user@server enter your password.. all good! I just tried it and it solved my problem...


0

So disabling UsePrivilegeSeparation in sshd_config seems to do the trick. Not really a huge fan of doing that, but it works ..


0

You can also load Putty Agent (pageant) and add the private key you generated with Putty for the server. Git recognizes this and uses that for push/pull.


1

I had transport = paramiko in my ansible.cfg to fix a different bug but seems to be causing issues with ForwardAgent=yes. Just removed the transport and it's working again.


0

I believe the answer is in the log file pam_unix(sudo:auth): auth could not identify password for [{deploy-user}] {deploy-user} : user NOT authorized on host I would make sure you can ssh deploy-user@PROD01 This link might also be helpful to setup rsync over ssh https://www.digitalocean.com/community/tutorials/how-to-copy-files-with-rsync-over-ssh


4

That's because you're not running a command. Try: less /usr/local/cpanel/logs/error_log or more /usr/local/cpanel/logs/error_log.


0

You can use -R for this purpose: ssh -R 8080:127.0.0.1:7070 yourhost This will open a port on yourhost:7070 that forwards to localhost:8080 Documentation says [-R [bind_address:]port:host:hostport]


2

You can move all the keys from all the servers to the one and modify sshd_config to list all of them (options HostKey). Then the server should offer all the keys. Also depending on the openssh version (if you are above 6.8), the clients will pick up all the keys when connecting and after some time you might remove the old ones.


1

I recently resolved a similar issue, where Ansible would encounter "UNREACHABLE!" errors only for tasks requiring file transfers (e.g. copy, template) while connecting just fine for anything else. I resolved it by adding the following directive to ansible.cfg, under the [ssh_connection] section: scp_if_ssh = True As you might guess from that fix, the ...


1

#!/usr/bin/env bash target_host=10.121.77.16 target_port=22 target_user=vagrant bastion_user=yourusername bastion_host=10.23.85.245 bastion_port=32780 scp -P $target_port -o ProxyCommand="ssh -o 'ForwardAgent yes' $bastion_user@$bastion_host -p $bastion_port 'ssh-add ~/.ssh/*.rsa && nc %h %p'" /tmp/x.txt $target_user@$target_host:/tmp/


1

This way: ssh -L 1234:localhost:1234 user@serverA Then, from serverA: ssh -L 1234:serverC:22 user@serverB So your local port 1234 will tunnel to serverA, from which it will tunnel to serverB, and finally to sercerC:22.


0

The AWS instance install is the most obvious common point in this scenario, followed by your internet connection / router. First try ssh'ing in from a spot instance in the same AZ and check it's reliable, to make sure it's not your VM. You could try from an AZ in a different region to double check. This should cost you around 10c total. Next try from a ...


0

This was a very simple fix where I just had to install libpam-ldapd on the client side instead of installing libpam-ldap on the client side. Once I ran that it gave me the option to use starttls.


0

You should be good using most any sshd troubleshooting guide, nothing overly unique with the EC2's. https://scottlinux.com/2012/03/07/troubleshooting-ssh-server-logs-and-error-messages/ Once you start digging through the logs, you'll get a better idea of what is going on which will help your searches.


1

Are you able to login as the other user still? If so, you should be able to do su - root or su - privilegedaccount? For whatever account you know the password for. With su you need to know the password of the account you are trying to become.


0

I believe some variant of auditd would be what you need, but it may be overkill. Similar questions have been asked before, here is an overview: Log all commands run by admins on production servers How do I log every command executed by a user? How can I make bash to log shell commands to syslog? How to log commands/logins in linux?


0

What are you expecting to get out of this? I don't see why it wouldn't work... but one thing you aren't doing is in any way collecting the results of curl in your script. Perhaps something like: my $response = `curl http://localhost/sendAuth.php?authCode=".$x`; print $response; Might do what you want? Although typically I'd suggest using the LWP ...


1

It seems as if you may not understand the SSH forwarding syntax. Please don't take this personally, but this is a prime example of why copy/paste software development and systems administration is so dangerous. People find examples online of how to do things, without bothering to do a bit of research into what actually is happening. Let's break down a part ...


0

use Dreamweaver to find and replace using the folder settings instead of file. (search and replace in all files in a folder) you can use regex to match the lines you need to replace if the middle of each is different, if the lines are identical its not needed. but thats just going to get your site back to where it was before being hacked. once cleaned you ...


1

mysqli constructor accepts 5th optional argumen specifying port. You should use $mysqli = new mysqli("127.0.0.1", "root", "root", "database_name", "3307"); instead. Did you verify you can connect to the port from the other host? Mysql is usually using unix domain socket instead of port (which you can forward too). ssh -fNg -L ...


0

So, I was able to solve this by re-compiling libc once more. I assume it must have been something in the toolchain, as I this time used a chroot being especially set to wheezy.


0

You're going to hate me, but the answer is, "No." The problem is, the destination server has no way of knowing whether you currently control the origin server. If someone hacks the origin server, or simply breaks security for the "test" user (hack, find password, unsecured terminal, etc.), the destination server would have no way of knowing, making a ...


0

I had to edit '/etc/pam.d/sshd ' with Auth required pam_tally2.so Deny=5 Unlock_time=1200 Even_deny_root Root_unlock_time=10 and it works now.


1

to manage hundreds of servers you likely would be better off using some sort of configuration management tool such as puppet and chef, or ansible etc. you still would have to set it up once but you can do much more than just ssh later so it would likely be worthwhile, for instance when you want to update the ssh key, a single change in the puppet master (or ...


0

you can use Bash: #!/bin/bash for ip in `cat /root/serverips.txt`; do ssh-copy-id -i ~/.ssh/id_rsa.pub $ip done


1

Setting up Match group proxyUsers ForceCommand /bin/connect_to_user_machine and having /bin/connect_to_user_machine #!/bin/bash ssh $USER@$USER.internal $SSH_ORIGINAL_COMMAND will do the job


0

.ssh/authorized_hosts is the wrong file name. .ssh/authorized_keys is the file you should be creating.


1

According to login.conf (5), the default grace period for an expired (aka "dead") password is 0. Unless that value is set in /etc/login.conf, a user cannot login to change her password if the current system date is greater than the 6th field of a user's password entry in /etc/master.passwd - refer to passwd (5). To solve the problem you will need to ...


0

On Mac os 10.9 I see: rsync -e 'ssh -c blowfish -oPort=2212 -ax' rsync error: syntax or usage error (code 1) at /SourceCache/rsync/rsync-42/rsync/main.c(1385) [receiver=2.6.9] hotel:~ tom$ rsync --daemon --help rsync version 2.6.9 protocol version 29 Copyright (C) 1996-2006 by Andrew Tridgell, Wayne Davison, and others. http://rsync.samba.org/ ...


-1

I have been connecting to AWS all the time using wifi. Make sure you allow SSH traffic to your IP as part of your AWS security group associated with your EC2 instance. Use whatismyip.com to get what IP is your ISP service as established for you. I have seen this change sometimes. Also, make sure you use the .pem file for authentication.


1

To resolve your cygrunsrv error while installing an sshd_debug service, you also have to change the <service_name> and not only the <service display name> in: cygrunsrv -I <service_name> -d "<service display name>" -p <service_path> where <service_name> is the windows internal service name <service display name> ...


0

In my case this problem appeared because of asymmetric routing. Packets from client to server go directly, but packets from server to client were sent through the router. Adding route to client subnet on the server fixed the problem.


0

Are you attempting a graphical login in the server room? The graphical login environment could be broken. You could try Control+Alt+F1 to bring up a text-based session similar to SSH. If you can log in to the console via text, then you can begin to investigate what went wrong with the graphical login.


1

To copy from Server A to Server B using scp you need to: 1) Pick a user on Server B (userB) who should "receive" the files. This user will require write permissions in the directory that files will be copied into. 2) Create a public/private key pair for that user. 3) Place the public key at /.ssh/allowedkeys on Server B. 4) Pick a user on Server A who ...


1

for better understanding, I would recommend you to look into these two components from OpenSSH suite (you can do it by man ssh-keygen and/or man ssh-copy-id): SSH-KEYGEN(1) — authentication key generation, management and conversion SSH-COPY-ID(1) — use locally available keys to authorise logins on a remote machine example (how to make key pair and copy ...


1

If you want to automate something like this you will need to setup public / private keys on either side and then configure ssh for authorized keys in the direction you want to copy. Assuming you are using OpenSSh do the following on both systems: ssh-keygen -t dsa cd ~/.ssh cp id_dsa identity cp id_dsa.pub authorized_keys cp id_dsa.pub systemname_id_dsa.pub ...


0

I faced a situation like yours some months ago, and I solved my problem (synchronization of www files between many nodes belonging to apache user) with btsync, that is a program that keeps many files aligned between two or more machines using BitTorrent protocol. It's secure, uses cryptography, and IMHO is very efficient and transparent. It's worth a try. ...


-1

I know that ssh in cygwin would support keytabs. Follow these instructions for setting up kerberos and ssh in cygwin: http://computing.help.inf.ed.ac.uk/kerberos-cygwin Instead of the step 'kinit username' execute: kinit -kt /path/to/keytab username (Then ssh as normal.)


0

What i understood from your post is that you used to ssh to your server using password authentication but you then changed this so you can login with Public Key. Provably you miss-configured your ssh-server/client. Assuming you have access to the server other than ssh (console maybe), a dirty , quick solution would be to uninstall (purge) the ssh server and ...


0

If you know that you don't want to use public key authentication, you can tell it to your client: ssh -oPubkeyAuthentication=no UserNameA@RemoteHostName or in ~/.ssh/config using Host RemoteHostName PubkeyAuthentication no If you know what key you want to use, you can do the similar: ssh -i /path/to/rsa.key UserNameA@RemoteHostName or in ...


0

May it be that you need to define an SSH key for the jump server A? If that's the case, try to change the SSH args line to: ansible_ssh_common_args: '-o ProxyCommand="ssh -W %h:%p -q -i <path_to_jumphost_keyfile> ec2-user@A.A.A.A"'


0

Nice answer from @Kasperd, but note also that if Host B is compromised, or if you don't trust all those with root privileges there, then you're still exposing all of your keys to abuse for as long as you're logged in on that host. So a better approach might be to forward only the keys you need. Maybe try ssh-agent-filter which is in debian / Ubuntu ...


0

From what you said, I guess your database doesn't allow external connections so, basicaly, nope, you cannot do anything remotely directly to the database.


2

ssh -vvv add ~/.ssh/mykey will try to connect to server add and run the ~/.ssh/mykey command. This is obviously not what you want but it certainly explains the error you're getting.


2

ssh-agent is storing encrypted key in memory so change to the physical key on disk does not affect its functionality. If you want make sure the change is effective, remove the key from agent and add it once more as noted in comments (ssh-add -D to remove and ssh-add to add the key again from default location).


0

On Fedora 23 to get this working I had to: Install pdsh-rcmd-ssh which makes SSH an available rcmd module dnf install pdsh-rcmd-ssh Export the following variable export PDSH_RCMD_TYPE=ssh


4

I managed to Solve it, here are the steps i followed. To fix the issue of root login using terminal. boot using bootable USB/CD select recover and mound disk go to mounted folder and run chown root -R / and chmod 755 -R / chmod 0700 -R /root/.ssh reboot normally Ignore SElinux contexts warnings and let it re-store contexts After this you will be able ...


1

Log into server using using KVM and check the below listed things. vim /etc/ssh/sshd_config find the below lines PasswordAuthentication if its commented than uncomment it or change it to yes from no #PasswordAuthentication yes #PermitEmptyPasswords no PasswordAuthentication yes Now check wheather status of ssh service is up and running if its not then ...


1

You need a beginners guide to AWS. I cover this in my Wordpress/AWS guide. Things to look at include your internet gateway and routing, which are covered in the tutorial.


3

I add a fake suffix to the hostname with different proxy hosts Host *.dc1 ProxyCommand ssh -q %r@dc1 -W %h:%p Host *.dc2 ProxyCommand ssh -q %r@dc2 -W %h:%p Then do something like ssh server1.dc1 and it will use the proxy host. You can add Host entries for custom settings like this: Host server1.* User jeff



Top 50 recent answers are included