New answers tagged

-1

This can also be caused by ssh-agent running. ps aux|grep ssh-agent It can safely be killed.


0

The best advises given on FAQ - WINSCP SPEED, PLUS - update the WINSCP to latest version. quote: When using SSH, file transfers in WinSCP are encrypted and it's CPU intensive. Blowfish is usually a lot faster than AES (so,try BLOWFISH). It may also help if you turn off compression, if you have turned it on before. In case the speed is ...


0

I had the same problem using authorized_keys with permitopen. On server side, /var/log/auth.log contained: Received request to connect to host 127.0.0.1 port 10001, but the request was denied. As I use autossh to create a tunnel, I needed two ports: one for connection (10000) and one for monitoring (10001). The problem came with monitoring port. In my ...


2

Assuming you want to overwrite service-user's authorized_keys file with a completely new version, you could do something like this: cat master_authorized_keys | ssh -t user@target \ "sudo -u service-user tee ~/.ssh/authorized_keys >/dev/null" I don't know if the -t there is really necessary, but maybe it is in your environment.


0

I found another thread at U&L: http://unix.stackexchange.com/questions/31824/how-to-attach-terminal-to-detached-process perhaps the answer does work for your problem.


0

AWS CloudFormation parameters can also give you a list of all key's that are available in your account & region. Just change the "Type" of the parameter to the desired AWS type. That will be "AWS::EC2::KeyPair::KeyName" in this case. With "CloudFormation Parameter Types", the above example will be: "Parameters" : { "KeyName" : { "Description" : "...


0

You can use vim-cmd: Here is an example (shutdown only one VM: SRV1): [root@ESX1:~] vim-cmd vmsvc/getallvms Vmid Name File Guest OS Version 1 SRV2 [NAS] SRV2/SRV2.vmx winLonghornGuest vmx-08 2 SRV1 [SAN] SRV1/SRV1.vmx winLonghornGuest vmx-08 [root@ESX1:~] vim-cmd vmsvc/power.shutdown 2 You can also ...


0

Rather than type your password multiple times you can make use of pssh and its -A switch to prompt for it once, and then feed the password to all the servers in a list. NOTE: Using this method doesn't allow you to use ssh-copy-id, however, so you'll need to roll your own method for appending your SSH pub key file to your remote account's ~/.ssh/...


0

Open your sshd_config file and ensure this UseDNS yes After that, restart your ssh server. I try this in Centos 7 and the IP become hostname.


1

This command: ssh -L 54320:Server_A:5432 user@Server_B looks good, but then when doing this: psql -p 54320 -d db_name -U user the ssh tunnel is not used, because by default on Unix, psql connects to a Unix domain socket, like suggested by the error message you mention ("...accepting connections on Unix domain socket...") You're just missing a -h ...


0

I've got the same message from a client (Linux) who was trying to connect to our sftp (Windows/ad hoc soft). The client IP was in our SFTP's black list(for some reason the client reached the max failures allowed). Remove the IP from the black list and we were happy.


0

I would use a host variable "ssh_users", which states the users that need their host keys added. - ssh_users: - bob - root - alice Then, you have a seperate variable file that defines the name, key and state for each SSH user. Import that variable file, then call your original task pretty much as is.


1

PAM generates that line of text due to the following configuration line in /etc/pam.d/login # Prints the last login info upon succesful login # (Replaces the `LASTLOG_ENAB' option from login.defs) session optional pam_lastlog.so There are some configuration options you can pass to that pam module, but I see nothing about resolving hostnames. /var/log/...


0

For the benefit of other googlers who also arrived at this question: Incorrect whitespace in a ~/.ssh/config file can also cause some head scratching. I recently helped out one of my co-workers who had this: # incorrect host foobar ForwardAgent yes instead of this: # correct host foobar ForwardAgent yes I've also run into instances where missing ...


0

You can establish ssh tunnel by running ssh user@example.com -L 9000:192.168.0.1:80 If you access http://192.168.0.1/testpage at work, then after runnig this command at home it will be http://localhost:9000/testpage


13

The Match address method was already mentioned, but you can also restrict the users (or groups) that are allowed to login onto a system. For instance, to limit logins to the user itai (from anywhere) and root (from a specific network), use: AllowUsers itai root@192.168.0.* This prevents all other users (like apache) from logging in through SSH. See also ...


50

Use the Match config parameter in /etc/ssh/sshd_config: # general config PermitRootLogin no # the following overrides the general config when conditions are met. Match Address 192.168.0.* PermitRootLogin yes See man sshd_config


3

You should not be relying on keeping an SSH connection active for successful execution of a long-running process. Instead of doing is as you are, start up a tmux or GNU screen session first and run your process within that. This way, the process will continue running if your SSH connection dies.


1

Copy the putty key to your mac Install Homebrew (if not installed) Install putty command-line on your mac brew install putty Extract your private key puttygen id_dsa.ppk -O private-openssh -o id_dsa Extract your public key puttygen id_dsa.ppk -O public-openssh -o id_dsa.pub Move the extracted keys to your $HOME/.ssh Source: How to convert .ppk key to ...


1

You will need to generate a keypair for your application to use. The private key gets deployed to your EB server, in whatever location your application needs, and the public key gets added to your list of deploy keys in Bitbucket.


0

I found that there is a problem if I use the sshd service. To avoid this problem, stop the sshd service with service sshd stop and then start the sshd daemon from the command prompt with sudo /usr/sbin/sshd.


0

You are solving this problem the wrong way. You need to understand Red Hat's patching policy (CentOS following upstream as it does, this is therefore CentOS's patching policy as well). As long as C6 is supported (ie, until 2020-11-30), and as long as you keep your C6 box fully up-to-patch, you will be running non-vulnerable versions of OpenSSL even though ...


0

You may run ldd /path/to/nginx to see how it's linked.


0

This is a real login. And to answer your question "how you can suddenly use a password login", It is because you simply have not disabled password authentication. If you do not require password authentication for any of your users, you should set the PasswordAuthentication flag in your sshd_config to no, as password can be keylogged or bruteforced. I ...


1

I know this is an old question, but I found it because I've been using Putty Command Sender for about five years and always thought it was pretty terrible. I didn't use it enough to go looking for alternatives until now. Just came across puttyCluster -- https://github.com/mingbowan/puttyCluster -- and holy sht, it's unreal I've been wasting time with stupid ...


0

Finally got it working. Here's the solution FNDLOAD is an OS command line executable. In order to run it we must ensure our enviroment is set up correctly in the shell, before invoking FNDLOAD. ((ChannelExec) channel).setCommand("cd path/to/env/file; . ./envFileName.env;"+ command);


0

First flush the routing tables of all gateway entries: sudo route flush Then route all traffic that fall under 10/16 to the ppp0: sudo route add -host 10.0.0.0 -netmask 255.255.0.0 -interface ppp0


1

What are the permissions on ~gameserver/.ssh/authorized_keys? If they are group-writable, an SSH server will refuse to use them, because someone other than the target user could add arbitrary keys. I can make my home computer refuse to accept my keypair with chmod g+w .ssh/authorized_keys. Now, in your case you haven't changed the permission bits (...


1

Yes, it is possible something like ssh-copy-id -f -i hostkey.rsa.pub user@target with latest version of ssh-copy-id. If you have some older, it might or might not work (with RHEL7 and older Fedora with SSH_COPY_ID_LEGACY=1 environment variable)


0

The pfSense php shell might help you out. Docs at https://doc.pfsense.org/index.php/Using_the_PHP_pfSense_Shell It appears to allow you to edit and view the config from the ssh shell.


2

Starting with ssh 7.3 (which is the next upcoming release as I'm writing this), an Include directive is available. Include: Include the specified configuration file(s). Multiple path names may be specified and each pathname may contain glob wildcards and shell-like "~" references to user home directories. Files without absolute paths are assumed to ...


0

Solution: Ask customer support if your account is put into isolation and have them remove it. This behavior will most likely only happen if your account was suspended and it wasn't removed when it was re-activated. Account Isolation can at the region level.


1

SSH is encrypted, so there's no need to double encrypt by using a VPN. Even if someone's snooping on the traffic they can't get access. Make sure you authenticate using public key, which is the default in AWS Amazon Linux instances, but may take a bit more work on other distributions. If you plan to SSH in from various locations the best bet is to close it ...


2

Yes, using a VPN for ssh access to EC2 is best. Even if you're closing access from a public address after you use it, it's still a risk while it's open, especially if someone is snooping traffic on, say, a coffee shop wifi. If VPN is not an option, there are a few steps you can take to mitigate risk (you should really be doing these either way): ...


5

A * in the location of the hashed password in /etc/shadow effectively disables all password based logins as no user input will ever result in a hash value of *. But the user can still login with his/her ssh keys. The difference of using * instead of using an exclamation mark ! is that the latter indicates a locked account in PAM, which, depending on your ...


1

The server didn't accept the key your client provided. The client provided only "/Users/kosmos/.ssh/id_rsa_old", guessing that's not the key that's in your authorized_keys file on the remote server. Check the auth.log on the server, it should contain something helpful as to why. If the public key for that id_rsa_old is in your authorized_keys file on that ...


2

You do not show what command you are using to connect via SSH It looks like you did this $ ssh 192.168.1.1:22 ssh: Could not resolve hostname 192.168.1.1:22: Name or service not known The syntax would be ssh ip -p port Example $ ssh 192.168.1.1 -p 22 The authenticity of host '192.168.1.1 (192.168.1.1)' can't be established. RSA key fingerprint is ...


1

It could be safe It depends on your security requirements and level of risk you are willing to take. Here are some considerations/ideas SSH is fairly secure, especially when forcing key authentication. Networks provide remote access via VPNs all the time. SSH is not much different. Password encrypt your SSH keys Enable automatic security updates You ...


1

What I did once: Implement 2 VPNs or IP Tunnels over each link and use the Linux bonding capabilities to glue them together. I did it with OpenVPN, via UDP and extremely fast encryption. You will not need 2 rsyncs this way, you will get a faster, single one. To speed it up, use very powerful compression and a protocol with less overhead than SSH, maybe ...


2

As per your comment: I found this in var/log/auth.log: Jul 7 17:23:02 v81553 sshd[14589]: User root not allowed because shell /bin/bash\r does not exist It looks like the shell for root is set to /bin/bash\r - likely the result of a tool attempting to add a newline to /etc/passwd incorrectly. You can confirm this with: $ grep ^root /etc/passwd root:x:...


2

You don't need to use /etc/hosts file to connect user@my-pc. Add following lines to ~/.ssh/config Host my-pc Hostname 192.168.0.4 Port 22 User john IdentityFile ~/id_rsa So now when you just type ssh my-pc it will connect to john@192.168.0.4 I have made to myself a little script to make adding new hosts as fast as possible, you may ...


1

In short, this is not the correct command... $ rsync -av ./2016-07-01 user@server:./path-to-project/2016-07-01 This is the correct command... $ rsync -av ./2016-07-01 user@server:./path-to-project Note, no forward slash or directory name for destination - when these are left off rsync will create the directory as required. I think the / and 2016-07-01 ...


2

After running sudo fixfiles restore and restarting the syslogd afterwards, this worked again for me. It's a known issue after upgrading CentOS 7 as described in CentOS 7.0 Release Notes - Known Issues - Security policycoreutils component, BZ#1082676 Due to a bug in the fixfiles scripts, if the exclude_dirs file is defined to exclude directories from ...


2

You can change the value in /etc/ufw/ufw.conf from Enabled=yes to no. Then do a restart


1

Use the force Luke! use RequestTTY force in your ~/.ssh/config for the desired host. btw. this is also discussed here http://unix.stackexchange.com/questions/27713/ssh-config-way-to-spectify-pseudo-tty-allocation-and-command-execution-like-sc/294468#294468


3

It is not possible to "use" a private key without being able to read - and thus copy - that private key. So the idea that your admins can login to the jumpbox, then go onwards using a private key that they cannot directly access, is not going to fly. But you can arrange things so that the private keys can only be used from the jumpbox (see man sshd, from= ...


2

1. Verify installation Run which sshd to get the path it is called from. If you don't get /usr/sbin/sshd in response, it is most likely not installed. 2. Installing sshd Run zypper in openssh to install the application. 3. Check firewall Run /etc/sysconfig/SuSEfirewall2 | grep sshd. You need to see FW_CONFIGURATIONS_EXT="sshd" - This means the firewall ...


-1

For me -q did the trick and I was still able to work with the output saved to a file. ssh -q root@server28 "ls -alF /dr_mksysb |egrep -v \"total|lost+found|./|../\" |awk '{print \$NF}' |sed 's/.\$//g'" > ${basedir}/28.list


1

Some TCP/IP Stacks in the middle of the route, like the hops in the middle , between your server and your endpoint client, actually cause the connection to be closed if keepalive is not used and connection keeping KeepAlive packets are not sent::::: Try::: ssh -o TCPKeepAlive=yes -o ServerAliveInterval=15 -i ~/MYDIR/id_rsa ec2-user(or--root)@myserver.com ...


2

Linux uses the strong end system model. IP addresses do not act in a way as if they were different machines. Instead a machine acts like it owns all its IP addresses. Since 192.168.150.1 and 192.168.1.1 are the same machine, no forwarding or routing is needed. If you reach one, you've reached the other.



Top 50 recent answers are included