Tag Info

New answers tagged

0

There is a script to do this. If you want to have a service available: from the script I would assume you need to do this: WILDFLY_DIR=$INSTALL_DIR/wildfly INSTALL_DIR=/opt WILDFLY_USER="wildfly" WILDFLY_SERVICE="wildfly" .... echo "Registrating Wildfly as service..." # if Debian-like distribution if [ -r /lib/lsb/init-functions ]; then cp ...


3

This is how I would back up secure data like this. I'm assuming because you're using ssh keys that you're comfortable on the command line. Move all the keys to a single folder. Make a tar archive of that folder. tar -cf keys.tar /path/to/keys/folder Then I'd encrypt the tar file with OpenSSL, using the command openssl aes-256-cbc -a -in keys.tar -out ...


0

If you download sublime text 2 from here, you will get Sublime Text 2.0.2.tar.bz2 After unpacking archive with command tar xfvj Sublime\ Text\ 2.0.2.tar.bz2 you will get directory Sublime Text 2, go to dir cd /path_to_dir/Sublime Text 2 and start text editor with command ./sublime_text If you want to start text editor only with command sublime ...


0

i've used a similar method with the same error and found out to use sshfs to connect/mount the sftp share on the server. Filezilla also connects but not able to get in with the terminal ssh command. http://www.fullybaked.co.uk/articles/chroot-ssh-ftp-users-to-home-directory was the tutorial i used to make it. I also had to create the home directory manually ...


0

You can install fail2ban to automatically start blocking these IPs once they make a few unsuccessful connections. Personally, though, I change the ssh port to something random like 32422 so that they can't even find your ssh server. Therefore, all traffic to port 22 is dropped and the bot will move on to a different target.


2

Cluster SSH Cluster SSH is used to start multiple SSH connections in separate terminal windows, with a common input box. You type in the input box and the keystrokes are sent to all the connected terminals. sudo apt-get install clusterssh Then run cssh: cssh host1 host2 ... Use a terminal emulator with broadcasting Terminator, for example, is a ...


1

There are many options to achieve what you want. My favorite is pssh (Parallel SSH). It can run commands parallely on multiple hosts and have variety of options. You can install it by: sudo apt-get install pssh pssh has some added advantages like it will be installed with parallel-scp, parallel-rsync binaries to do as their names suggest. Here is an ...


0

I saw this problem last night. $ sudo ufw allow ssh $ sudo ufw enable Didn't affect my current ssh session, but it did cause a significant delay with ssh logins. For example, an ssh login like below would hang for some period of time before (finally) prompting for a password: $ ssh myusername@mydomain.com $ (wait for 40 seconds or longer until...) ...


0

Also make sure that the user's home directory (on the server) actually belongs to the user ssh'ing into (was set to root:root in my case). Should have been: sudo chown username:username /home/username;


0

I had my home directory encrypted and found this one helpful : http://tweaktheserver.com/ssh-cant-connect-authentications-that-can-continue-publickeygssapi-keyexgssapi-with-micpassword/


0

With your server properly configured, and with X11 server installed on your Windows. You might need to run export DISPLAY=YOUR_IP:0 on it after connected to the server. The "YOUR_IP" should be change into the IP address of your Windows. Or, you can try to run startxwin in you Cygwin shell before connect to the server, which will brings up a xterm window ...


0

Try using setterm -blank 0 It needs to be entered after every boot, but keeps things running.


0

Easy as pie. Simply go to the .ssh folder in your home and add the file config nano /home/${USER}/.ssh/config and add the following lines e.g. Host duck-a-rub HostName mail.man.com OR <IP-Address> User rubberduck Port 223 IdentityFile /full/path/to/keys/rubberduck_id_dsa save the file and give it a try. ssh duck-a-rub HTH, s1mmel


0

The directory you are chrooting (in your case %h) should be owned by user root. Use command sudo chown root.root %h


0

If you're chrooting the users, you should either use ForceCommand internal-sftp or set up a shell (along with everything it needs) in each home directory. If neither of these was done, SSH won't be able to login the user.


3

I have this little script kept in ~/bin/infinite_ssh(1): #! /bin/bash -x # while :; do ssh -R 2222:localhost:22 remoteserver sleep 86400 sleep 10 done this is connecting to the remoteserver and creates a backward tunnel so that in the remote server I can ssh my desktop by using ssh -p 2222 localhost. Your application may, obviously, ...


0

I'm using Proxychains, an easy to use command line tool. Usage: sudo proxychains4 apt-get update You can configure you proxy in the /etc/proxychains.conf [ProxyList] socks5 127.0.0.1 12345


0

Use this set of iptables rules to set up your local computer as a NAT router: iptables -P INPUT DROP # drop every INPUT iptables -P FORWARD DROP # drop every FORWARD iptables -A INPUT -i lo -j ACCEPT # accept loopback-INPUT iptables -A INPUT -i eth0 -j ACCEPT # accept eth0 INPUT iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE # NAT-Translation ...


0

Suggesting that both are linux machines you will have to set up routing on your local computer, that means at least setting this kernel parameter: echo "1" > /proc/sys/net/ipv4/ip_forward (This is a non permanent setting, it is gone after reboot. Put this line into /etc/rc.local for example to do this always on startup.) The remote computer needs to ...


0

You can use this: ssh -t username@host "/usr/bin/bash" The -t is necessary, to create a pseudo-tty for the shell to use as an interactive shell. Source


2

Yes you can install a ssh server on the windows guest. Options range from cygwin and several ssh servers are available. See http://www.windowsnetworking.com/articles-tutorials/windows-server-2008/install-SSH-Server-Windows-Server-2008.html You can download cygwin here - https://www.cygwin.com/ When you run the installer (cygwin.exe) you may choose what to ...


1

This is an old thread and I just ran across this answer, I will just add what I did to solve this. ssh-keygen -f "/home/USER/.ssh/known_hosts" -R HOSTNAME I just looked at the error message that it threw at me and it said to run that command in order to remove it from the list of hosts. After that I did the following: ssh-copy-id HOSTNAME Than I ...


3

You can use the SSH_CONNECTION and SSH_CLIENT variables: $ echo $SSH_CONNECTION 10.0.0.1 42276 10.0.0.2 22 $ echo $SSH_CLIENT 10.0.0.1 42276 22 $ SSH_IP=${SSH_CONNECTION%% *} $ echo $SSH_IP 10.0.0.1 From man 1 ssh: SSH_CONNECTION Identifies the client and server ends of the connection. The variable contains four ...


1

Can we say with certainty that an IP from china somehow SSH'd into my machine? Even though it only accepted RSA key authorization? It is unlikely they were authenticated, unless they managed to obtain a valid key. Try connecting from a host you control without a key and check the running processes. They should be similar to what you saw. The fact the ...


1

Lots of ssh brute force attacks taking place. It is possible you have an obsolete ssh package and they got in that way. Check for ssh failures in the logs, he maybe simply doing a brute force against you. go to /tmp and post its output from ls -al, if there is a root kit it might show up there. You can set allow users in ssh and fail2ban is useful as ...


0

The line is bellogs to error output, i.e. sterr. You could get rid of it with netstat -tapen 2> /dev/null | grep ssh For reference check this As properly noted by heemayl , without sudo, netstat won't report that connection is established by the ssh server, only if it's established by ssh client. Of course, you can still determine it by port number ...


1

Answer to 1 & 2: The warning is from netstat, not from grep and its about the PID/Program name column of the netstat output: $ netstat -tapen (Not all processes could be identified, non-owned process info will not be shown, you would have to be root to see it all.) Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address ...


0

The application was the issue since, as everyone suggested, scp functionality means these files would never appear. As it turns out, the application I use was generating the *.00# files if it couldn't do a direct replacement. My fix was to remove the old images from the folder before running the program, and do a more specific cp, as Jacek suggested in ...


2

Connecting inside your LAN: Just type in the local IP, the one output from "ifconfig" or "ip address". To have people outside your LAN connect: Forward a port to your game server's local IP address. In order to not have to adjust the forwarding all the time, you'll probably want to assign your game server a static IP address from your router. Anyone ...


2

refused connect from [IP-ADDRESS] ([IP-ADDRESS]) This particular message is emitted by the TCP wrappers library when it decides to reject a connection. Ubuntu's sshd is built to use TCP wrappers. Check the two files "/etc/hosts.allow" and "/etc/hosts.deny" on the ssh server. You have an entry in one of those files which causes ssh connections from that ...


1

Seems like colors were already set in ~/.bashrc for me and the issue is that ssh does not use the bashrc file. You can use bashrc in your ssh session by adding the following to ~/.bash_profile: if [ -f ~/.bashrc ]; then . ~/.bashrc fi


1

You say you want the connection to automatically restart if it is disconnected. There is a package to do that: autossh. See, e.g. here for how to use it. That link also has a start-up script for making it restart on boot, though that's relatively trivial; it's the restarting on connection failure which is hard.


5

There are a lot of reasons that can make a connection fail, even using keepalives and things like that; so you should think about a mechanism to restart it automatically. What I would do is: set up your SSH endpoint so that you can log in with a key in password-less mode: How can I set up password-less SSH login? Prepare a script that do the connection ...


1

Looks like you've got the same problem I had a few years ago, though I only had to put a router in my back-pack! A few hints before you go trek up a mountain: Take a new server identical to the one you've locked yourself out of just in case you can't solve the problem with physical access. Have an Iridium phone plugged into a modem attached to the new ...


3

It's likely that what's ending up happening is that the network administrator for their work network is blocking TCP port 22 outbound, and UDP port 22 outbound, to block SSH access. This is done for a security concern of data being 'uploaded' from the internal network to a server that is not controlled by the organization. This is also done as a matter of ...


-2

A simple solution is to telnet the server ip address or DNs on port 22. telnet 22 If the telnet is successful, then you should assume that the problem is on her laptop, otherwise its withing the network she is trying to log in. In the event that the telnet is not successful, it means that the admin of the "wifi network" has blocked the traffic going to ...


0

The default rules that come with the Openstack security policy appear to make everything wide open but I am finding that's just not the case. I had to manually add all the Egress and Ingress ports I needed before everything was working properly. So in this case, it appears to be 100% related to the openstack security policy I was using on the instance


0

All credit goes to user nus. Just copy the relevant .desktop file from /etc/xdg/autostart to ~/.config/autostart and add Hidden=true to it. For example: cp /etc/xdg/autostart/gnome-keyring-ssh.desktop ~/.config/autostart echo Hidden=true >> ~/.config/autostart/gnome-keyring-ssh.desktop then reload gnome-shell. This is the only user-friendly ...


0

until this bug is resolved, you can try to first kill plymouth. Unfortunately, there is no easy way to determine the PID of plymouthd. But plymouth knows how to quit itself :-) So the following should be sufficient. plymouth --quit; echo -ne "keyphrase" > /lib/cryptsetup/passfifo


3

I increased the number of files limits for everyone this way (segment from /etc/security/limits.conf): # - memlock - max locked-in-memory address space (KB) # - nofile - max number of open files (Doug: - so Samba will not complain) * - nofile 16384 # - rss - max resident set size (KB) # - stack - max stack size (KB) That was on ...


1

For me ~/.ssh/known_hosts on my local system was bad. I deleted it and then reconnected to all the servers without issue.


-2

Check the permissions for the keys inside the .ssh folder Your private key should be protected: Make sure your private key has permissions like {r-x------} If not just do this by running chmod 600 id_rsa


0

You may try: sudo apt-get install packagekit-gtk3-module This fixed it for me on Ubuntu server 14.04.


0

I have found a work-around that suits me for now: Instead of having ssh do all the work of setting up users on the fly: you can set one user to be accessible via ssh: edit /etc/ssh/sshd_config adding a line 'AllowUser ' and that user's launch script can be one which manages user accounts, creating them as needed, and then connecting the user to the correct ...


1

I have written the following script that connects to my PI ownclod server and backs it up on my laptop. The script is working perfectly. You can see if it will help you: #!/bin/bash echo "[`date +"%y-%m-%d %H:%I:%S"`] Sync started"; CURRENT_DATE=`date +%y-%m-%d` BACKUP_DIR="/home/radoslav/Backups" CURRENT_BACKUP_DIR="$BACKUP_DIR/backup-$CURRENT_DATE" ...


3

The correct way to create new user is by using the adduser binary (it covers everything from user password to group and home folder creation, thanks to @muru @Takkat for pointing this out, Man Page of the command): ubuntu@ip:/$ sudo adduser testuser Adding user `testuser' ... Adding new group `testuser' (1003) ... Adding new user `testuser' (1002) with ...


0

Without a command, SSH runs a login shell. For bash, that involves sourcing .profile (which, on Ubuntu, sources .bashrc) (and /etc/profile, which sources /etc/bash.bashrc). There are other files which could be sourced instead, such as .bash_profile, but a default Ubuntu setup has only .profile. $ grep bashrc /etc/profile .profile /etc/profile: # The file ...


1

This page has more than you probably want to know about it, but it's a great concise resource: http://mywiki.wooledge.org/DotFiles Basically, when you ssh to a computer, you are not running a 'login' shell, so different files are sourced. In short, if your default shell is /bin/bash (default on Ubuntu), you will be sourcing a ~/.bashrc in your home ...


1

screen ./example.sh will start your process inside an own shell. You can detach from this shell by holding CTRL and pressing A+D. Now you can close your SSH connection and the process will keep running. You can also reconnect via SSH and run screen -r to get back to your process


0

Try using nohup: $ nohup ./example.sh & This will run your process in the background and won't be terminated when you exit your shell (logout). It will write output to a file called nohup.out.



Top 50 recent answers are included