Tag Info

New answers tagged

0

Maybe you deleted ~/.ssh/config by accident. Run in the remote system: sudo nano ~/.ssh/config And insert the following: Host * ServerAliveInterval 60 Then type: sudo service ssh restart What it does is to tell the server that you are alive every 60 seconds.


0

Sorry for my maybe dump answer: in your post you wrote that you made a change by setting up fail2ban. Did you configure a jail for sshd? If it is the case please try out if stopping the fail2ban server helps.


1

With putty, you can upload public key manually, assuming you now can access the server with username and password: Generate the key file, with the guide you followed it will be .pub file, the content of the file should shart with "ssh-rsa AAAA ...." Login to the server machine Copy the content of the .pub file into the ~/.ssh/authorized_keys file (for this ...


0

Just install the ssh-askpass-gnome package. Then add an ssh-add.desktop file to ~/.config/autostart directory, with the following content : [Desktop Entry] Type=Application Exec=/usr/bin/ssh-add Hidden=false NoDisplay=false X-GNOME-Autostart-enabled=true Name=SSH agent passphrase


0

Can you try forcing the use of your password instead of the public key authentication? E.g.: ssh -o PreferredAuthentications=password -o PubkeyAuthentication=no user@host.com The ~/.ssh/authorized_keys2 syntax is one pubkey per line, so simply adding another public key to the next line shouldn't have broken anything. See ssh(1) and sshd(8) man pages ...


0

$1 is the first argument to a script and you are not passing an argument to it in the example above.. You could make this work by either making a file_count.sh script: #!/bin/sh ssh user@host "grep \"SearchTerm $1\" file.txt \ | sed 's/^.*SearchTerm $1,//g' | sort | uniq -c | sort -nr" or another idea is to make a bash alias (or equivalent with ...


6

The command after the pipe symbol gzip -c > /sql/mybackup.sql.gz is running on your local machine. You should use /usr/bin/ssh -p 82001 user@remotehost "mysqldump -u db_user -pSomePass mydb | gzip -c > /sql/mybackup.sql.gz" Example: % ssh user@host "echo remote" | echo local local user@host's password: % ssh user@host "echo remote | echo ...


5

Not that odd, you're piping the output of the ssh command within your shell; you should pipe it within the shell on the remote server: #!/bin/sh /usr/bin/ssh -p 82001 user@remotehost "mysqldump -u db_user -pSomePass mydb | gzip -c > /sql/mybackup.sql.gz" Also mind that you're not using bash, but sh. To use bash: #!/bin/bash /usr/bin/ssh -p 82001 ...


0

The main thing you're doing wrong is expecting PuTTY to open the .ppk file: as far as I know the key file itself contains no information about the target host (indeed, that wouldn't make sense since the same key pair may be used to access different hosts). Instead, you should open PuTTY normally, and configure a session to use the key file by selecting ...


1

First you need to upload public key to the server you are willing to connect to, public key is in .pub file: Example: # ssh-copy-id -i ~/my-certificate.pub root@12.34.56.78 After this it should be working and you should be able to login using: $ sudo ssh -i ~/my-certificate.pem root@12.34.56.78 Changes are made in file ~/.ssh/authorized_keys on server ...


1

So I copied in all of the ssh_host_* files (with and without .pub) and that seemed to do the trick. I made sure the permissions and ownership were as indicated by the following answers: http://superuser.com/a/532079/185661 http://askubuntu.com/a/17103/333103


1

Open this file with vim and delete line 21 number entry it solves your problem /home/dynamix/.ssh/known_hosts.


4

Well what it is saying is that the RSA Fingerprint has changed which will happen if you reinstall the OS on the remote system or you reassign an IP or DNS record to a new system. As long as you are sure you have the right system, you can remove the entry for that host on line 21 of the /home/dynamix/.ssh/known_hosts file. Since 10.21.50.126 is a private ...


-1

You can combine ssh, sudo and e.g tar to transfer files between servers without being able to log in as root and not having the permission to access the files with your user. This is slightly fiddly, so I've written a script to help this. You can find the script here: https://github.com/sigmunau/sudoscp or here: #! /bin/bash res=0 from=$1 to=$2 shift ...


0

I could solve it by simply adding setenv('LC_ALL','C') to the Matlab code.


0

So you can try to create a group like its said in the links given by you, then add in this group all the users that can modify the files which belong to wp-user. finally all the files creates by wp-user need to let the write permission to this group. Or create a directory where only users who are authorised to modify the files of wp-user can acces to this ...


0

The user configuration files that are read while initiating an interactive login shell like ssh are: The user configuration files ~/.bash_profile, ~/.bash_login, ~/.profile (any one of them, searched in that order) The global configuration file /etc/profile Now the mentioned issues must be in one of these files or in any other file sourced from these ...


0

I had a similar problem to this. I needed two PCs, one on Ubuntu and another on Arch, to sync files through Unison but ran into the same permission denied error. Just for the sake of those who are having the same problem as I was, here's what I did: First: Installed the same version of Unison on both PCs. This was a bit challenging as the one available on ...


0

Try this: sshpass -p '[MYPASSWORD]' ssh [USER]@[HOST] 'bash -s' < PATH/TO/LOCALSCRIPT It seems that command is needed in the case when there is no terminal at all. (found here)


0

It appears as though you have a program set up too automatically run GEDIT when starting a shell (Or you're trying to open it). This won't work via ssh because you don't have an X-Server running in your current session. As for the issue with running ssh -X -l root your-machine-name your copy of ssh wasn't compiled to support the -X option Basically you: ...


-1

Well, you could just add this line to your ~/.profile1: HOME=/user/home/ However, that really isn't a good idea. Problems it would cause include (but are probably not limited to): That will only work if /home/user is owned by your user. If it isn't, you won't even be able to log in. This will work for your user only. For everyone else, your home ...


0

PCManFM supports mounting of network file shares. In the main menu, select Go > Connect to Server... I'm not familiar with WinSCP, but I assume it uses SSH. To mount an SSH share, select SSH and fill in the appropriate information, including at least the host, port (if other than 22), and user. Enter your password and how long you'd like to remain ...


1

All login attempts are logged to /var/log/auth.log Search for brute-force SSH logins Run this command: grep sshd.\*Failed /var/log/auth.log | less Search for failed connections Run this command: grep sshd.*Did /var/log/auth.log | less UPDATE: You should try restarting the syslog daemon to see if it starts to log to the correct file. sudo service ...


0

If you need a SCP client with a GUI, than you could try filezilla: sudo apt-get install filezilla Use sftp as protocol (eg: sftp://myhost) in the Host field as Port 22


0

Try using sshfs. sudo apt-get install sshfs - This command will install sshfs for you. Then you just need to mount your ssh directory in your local filesystem, like this: sshfs user@server:/path/to/remote/dir /path/to/local/dir Where the local dir is the place you wish to mount your remote files. You can then browse your remote files using PCManFM. Hope ...


0

If you want to traffic from all applications through the SOCKS proxy server tsocks would do the trick. tsocks is a library to allow transparent SOCKS proxying. It wraps the normal connect() function. When a connection is attempted, it consults the configuration file (which is defined at configure time but defaults to /etc/tsocks.conf) and ...


0

One way would be to create .desktop files. You can copy the google-chrome-stable to your desktop by typing in from a terminal window: cp /usr/share/applications/google-chrome.desktop /home/username/Desktop Open the google-chrome.desktop file with your favorite editor, and change the following line: Exec=/usr/bin/google-chrome-stable %U to: ...


0

I managed to get this working by manually starting sshd: sudo mkdir /var/run/sshd sudo chmod -R 755 /var/run/sshd sudo /usr/sbin/sshd


0

As Velkan said, you can use the command man alarm. Or you can refer to the Kalarm manual online: https://docs.kde.org/trunk5/en/kdepim/kalarm/cmdline-operation.html#cmdline-schedule


1

You don't need a specific Distro for this kind of Networks, this is a simple Network Connection between a server and users, since you are on the Ubuntu Ask, i gues Ubuntu will be one of ur 1st choice. Keep in mind that not the distrubution will make you troubles, the configuration of the Network will. So basically you can go with any distro you like the ...


0

apt-get install openssh-server cd /etc/ssh/ vi sshd.config #PasswordAuthentication yes uncomment it and change it to NO PasswordAuthentication no then restart the ssh service service ssh restart root@stack:/etc/ssh# service ssh restart ssh stop/waiting ssh start/running, process 4118


2

Two near identical config files: /etc/ssh/ssh_config and /etc/ssh/sshd_config For the SSH server, put the setting in the sshd config file, NOT the ssh config file.


1

Run the command with sudo: sudo /usr/sbin/sshd If you still get the privilege separation directory error: sudo mkdir /var/run/sshd && sudo chmod -R 755 /var/run/sshd


1

Just do sudo ufw enable and sudo apt-get install gufw Then open your Dash and search for "Firewall". Open it and the rest should be self explaining.


0

Try checking if you have a ssh config file. Here you can set different autologin actions, where to put the keys for accessing to the servers, etc. This file can be found at '$HOME/.ssh/config'. If exists, here you have the key to connect.


0

Turned out that I was able to login because authorized_keys file was not empty. It looked empty because first I run nano authorized_keys I mean without sudo command.


2

The first error is because you created a user whose home directory doesn't exist. This is one of the reasons why you should always use adduser instead of useradd. As explained in man useradd: useradd is a low level utility for adding users. On Debian, administrators should usually use adduser(8) instead. One of the features of adduser is that it ...


0

After hours it's finally done! I just create new user like this : useradd -ou 0 myuser -p [#hash-password] and then I changed PermitRootLogin yes in this path : /etc/ssh/sshd_config easy as pie :)


0

Along the years, I developed a GUI to do exactly what the OP asks... except that it requires a ssh access to a third server with public IP, as suggested by Pavlos. You can find here the debian packages and the instructions: http://pietrobattiston.it/reachme Notice it (still) is not able to take care of the initial configuration - namely, you have to setup ...


3

Usually on Linux there is only one user root, and on Ubuntu it is deactivated. Instead it is a better idea to add all users that should have administrative privilieges to the group sudo by executing adduser username sudo as root. That allows them to execute commands as root by typing sudo command and get a root shell by sudo -i On top op that, you ...


0

rsync -Pavp --rsh="ssh -i YOUR_KEY" DEST USER@REMOTE:SOURCE


0

Using python: #!/usr/bin/env python2 import re, crypt, subprocess with open('/var/log/auth.log') as logfile, open('/etc/passwd') as passfile: given_usernames = [] for line in logfile: name = re.search(r'(?<= Invalid user ).*?(?= from)', line) if name: given_usernames.append(name.group()) current_usernames = [] ...


0

I like a challenge. Yes you can do this, if you are willing to let the first ssh fail. The following script (which I actually tested) tails the sshd log, which by default (on my system) produces lines like this on a failed ssh login: Jun 20 21:06:35 home sshd[18163]: Invalid user dummy from ::1 When such a line is matched, the user id (dummy in this ...


1

You can simply use the command ps with no arguments. Here I have 3 nested bashes so 3 exits to type: ~ $ ps PID TTY TIME CMD 1986 pts/2 00:00:10 bash 31351 pts/2 00:00:00 bash 31399 pts/2 00:00:00 bash 31450 pts/2 00:00:00 ps


0

Remote Desktop Protocols(Xrdp-VNC-....) are not affected by the OS version. You can connect to any other version. Also this have nothing to do with Remmina. You should be aware of installing packages on your machines. For xrdp install it: sudo apt-get install xrdp To learn how to configure xrdp on Ubuntu please take a look for my answer here: problem ...


-1

I was facing the same problem.. but when i checked for the users, the user which i was using was not permitted to access SSH over the server. So I recommend you to cross check the user permission that your user (david) is permitted to access SSH on server.


3

You can use the SHLVL variable to determine how far nested in you're, to a shell started by a login process: $ echo $SHLVL 1 $ bash $ echo $SHLVL 2 $ bash $ echo $SHLVL 3 $ sudo su - # Start a login shell, clears $SHLVL # echo $SHLVL 1 # logout $ sudo su # echo $SHLVL 4 # bash # echo $SHLVL 5 Since the login shell from su - clears ...


0

I could solve the slow password prompt via ssh - issue by checking Enable DNS Relay in DHCP settings on my dlink router. Afterwards connections with SSH worked within a second. Network Settings -> Router Settings -> Enable DNS Relay [x] The default configuration forwards every DNS request to the provider. It was slow although I was connecting with ...


1

The message Error: debug1: Roaming not allowed by server is only a debug message, not more. Follow the steps below to authenticate via public key: On your server enable the password authentication. Open the ssh-server configuration sudo nano /etc/ssh/sshd_config and enable the password authentication PasswordAuthentication yes Reload the ...


0

I scratched the VM, created a new one, only difference is: chose the option to install updates during installation. Ran: apt-get install aptitude aptitude install openssh-server And it worked fine. No idea why it didn't work the first time. That's why I thought it was strange when it happened.



Top 50 recent answers are included