Hot answers tagged

4

Enable one of the SSH keepalive messages, for example by enabling TCPKeepAlive or ClientAliveInterval in the server's sshd config. Similarly, in the client config you can use TCPKeepAlive and ServerAliveInterval. TCPKeepAlive used to just be KeepAlive, if you have an old version of OpenSSH. TCP keepalives are a feature that is part of TCP, and operates ...


3

You could create a config file for ssh(~/.ssh/config) with the content Host UnisonHost HostName 192.168.1.102 User username and then call unison with UnisonHost: unison /var/www ssh://UnisonHost/var/www


2

You need to tell PAM also that you want to allow empty passwords. There is some outdated tutorial describing that. But in short: sudo sed -i 's/nullok_secure/nullok/' /etc/pam.d/common-auth should do the job.


2

If you search around, what does Host key verification failed mean, you will find enough information to resolve your problem. The problem in you case is that you run pdcp under root user (sudo). Is it really what you want? If not, run it without sudo and it will Just WorkTM. If you really need to run pdcp under sudo, you need to do the host key ...


2

You're on the right track with tty, and the -t option gives you just that. However, unless you are actually aiming to get a tty session for interacting, leave this option off of the last ssh command in your chain. In your case you just need it on the first connection: ssh -L 5901:localhost:6000 host1 -t ssh -L 6000:localhost:5901 -N host2 Now when you use ...


2

An ssh key has two parts, a private part and a public part. That's why it's often called a 'key pair', a pair of keys that work together. ssh-copy-id copies the PUBLIC portion of the private/public key-pair into ~/.ssh/authorized_keys on the remote host. Anyone who has the private key (and knows the passphrase) can login to that remote host without a ...


2

Use public key authentication In the source host run this only once: ssh-keygen -t rsa # ENTER to every field ssh-copy-id myname@somehost That's all, after that you'll be able to do ssh without password. Coming to your question, use below command now, ssh apple@192.168.1.117 'ls -l /applications'


2

All you need to do is parse the command's output and replace the first newline (\n) with a comma. This should work: ssh test01 "hostname && cat /etc/sysconfig/rhn/rhnsd " | perl -00pe 's/\n/,/' Here we're using perl to slurp the entire file into memory (-0) and replace the first \n with a comma. The -p tells perl to print each input "line" ...


2

I found the answer https://en.wikibooks.org/wiki/OpenSSH/Cookbook/Proxies_and_Jump_Hosts SOCKS proxy via an Intermediate Host If you want to open a SOCKS proxy via an intermediate host, it is possible: $ ssh -L 8001:localhost:8002 user1@machine1.example.org -t ssh -D 8002 user2@machine2.example.org The client will see a SOCKS proxy on ...


2

First possibility is obvious (note the -t switch): ssh -t -i cloudkey -L 6000:localhost:6001 admin@54.152.188.55 -p 9000 \ "ssh -D 6001 -p 6666 localhost -l dancloud" With ProxyCommand it is more complicated on the first sight, but conceptually you need only one forwarding (netcat version is not advised anymore, using -W switch is more elegant): Host ...


2

It is not a problem of ssh-agent, but of your Windows client (providing ssh-agent interface). It looks like it does not implement interface to add another key from the socket. This should not be a problem with normal ssh-agent. Only possible solution today, I know about is to copy the key to your local host. There is open upstream openssh bug (client ...


1

I can expect the settings in /etc/ssh/ssh_config to be ignored? Yes. ssh reads -F command-line option, which will set config variable: case 'F': config = optarg; break; and later on calls process_config_files, which either reads config specified on command-line or reads the other two (/etc/ssh/ssh_config and ~/.ssh/config) files. ...


1

If running the client in verbose mode (ssh -v user@host) gives you debug1: Remote: No xauth program; cannot forward with spoofing. but xauth is indeed installed on the server, then it is probably because sshd looks for xauth executable in wrong location (/usr/X11R6/bin/xauth usually). One can fix that by setting XAuthLocation /usr/bin/xauth in ...


1

A gives a key to B, why can A login on B without password? You're right. When SSH receives an incoming connection, it can authenticate the user in multiple ways. This is configurable. A typical way is to check whether the user has a public key in an ~/.ssh/authorized_keys* file, and to accept a matching private key (assuming that all details are ...


1

What you're missing is that ssh-copy-id doesn't just copy the public key to B: it adds the public key to the list of keys that allow access to the account (~/.ssh/authorized_keys). After running ssh-copy-id, the key is not just stored on B somewhere, it's registered on B as an authorized login method. The private key is on A, and needs to be passed to the ...


1

Like most configuration files, /etc/ssh/ssh_config only needs to list options that are changed from the default. If the file isn't present, ssh uses the default options. If you aren't relying on non-default settings, then the absence of the file has no impact. For example, on Debian, the only options that are in the default ssh_config file are: SendEnv ...


1

Invocation of reptyr is sufficient to detach the terminal, but has to be sudo reptyr -T $PID From man reptyr: -T Use an alternate mode of attaching, "TTY-stealing". In this mode, reptyr will not ptrace(2) the target process, but will attempt to discover he terminal emulator for that process' pty, and steal the master end of the pty. ...



Only top voted, non community-wiki answers of a minimum length are eligible