Tag Info

Hot answers tagged

18

Use rsync with the --partial option rsync -av --partial sourcedir user@desthost:/destinationdir The --partial will keep partially transferred files. When you resume the rsync transfer after a ssh broken connection, partially transferred files will start resuming from the point where the ssh connection was lost, and also successfully transferred files will ...


8

Unlock the account and give the user a complex password as @Skaperen suggests. Edit /etc/ssh/sshd_config and ensure you have: PasswordAuthentication no Check that the line isn't commented (# at the start) and save the file. Finally, restart the sshd service. Before you do this, ensure that your public key authentication is working first. If you need ...


6

The ssh user@ip is correct syntax. The other logs in to the host ip as you and tries to run a command called root. Please update your question with an explanation of what are you actually trying to achieve.


2

The problem was that I had created a new user but had not created a home directory. SSH closed the connection immediately, but logging in locally gave me a message saying that the home directory did not exist. I tried to create the directory manually with mkdir /home/jschmo running as root, but that ran into permission problems. I deleted the user and ran ...


2

Whatever you do, don't leave the account in the state left by passwd -u, with a blank password field: that allows logins without entering a password (except over SSH, because SSH refuses that). Change the account to have no password, but be unlocked. An account has no password if the password hash in the password database is not the hash of any string. ...


1

From an IT standpoint, your VPN provider will have to push routes to your system to access the SAN or application servers the network is running. If RDP is pushed through another firewall or NAT, then you'll have to ask your system admin. If your IT team is smart, their firewall may block traffic from the VPN network to the server network. Which is why ...


1

Create a wrapper shell function sshc which prefixes the source ~/.bash_profile boiler plate for you: function sshc { local host=$1 local cmd=$2 ssh $host "source ~/.bash_profile && $cmd" } You can then use this as: $ sshc localhost 'which perl' /home/calid/perl5/perlbrew/perls/perl-5.20.1/bin/perl


1

@scoopr and @Halil Özgür answers didn't work for me. This worked for me: ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no user@example.com Source: http://linuxcommando.blogspot.com/2008/10/how-to-disable-ssh-host-key-checking.html


1

Ended up with HPN-SSHand pigz. tar -cf - -C [RELATIVEFOLDER] [FILENAME] | pigz | ssh px "pigz -d | tar xf - -C [REMOTEFOLDER]" Improvement by power of ten. For reference, installing HPN-SSH and pigz on Ubuntu 14.04 is easy as: # hpn-patched ssh from ppa sudo apt-get install python-software-properties sudo add-apt-repository ppa:w-rouesnel/openssh-hpn ...


1

You could configure your SSH server to listen to both ports, and then use iptables to restrict access to port 22 to a single IP number. Something like the following (where x.x.x.x is the IP number you want to allow): iptables -A INPUT -p tcp --dport 22 -s x.x.x.x -j ACCEPT iptables -A INPUT -p tcp --dport 22 -j DROP


1

As said by others ssh user@ip is the correct sintax. If you use ssh ip user, the "user" part is actually a command to be executed on the remote host. When you suppress the user@ part from the correct sintax, you are actually passing your local user to the remote host. If you don't have a user with the same name, or it is a disabled user on the remote host ...



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