Tag Info

New answers tagged

0

You can use sshfs. Install and setup sshfs. After setting up sshfs add this 2 alias to your .bashrc. alias fuse-mo='sshfs remote_user@remote_server:/home/ternovi/your_local_folder /home/remote_user/folder_with_file -o idmap=user -o reconnect' alias fuse-um='fusermount -u /home/ternovi/your_local_folder' Now create folder /home/ternovi/your_local_folder ...


0

What do you mean by "read" the file? If you just want to echo the contents back to the STDOUT, then this should do it. ssh user@remoteHostName 'tail -f /myDirectory/myFile.txt' That should work if you have SSH set up properly, "user" is a valid user on your remote host, and the -f flag on the tail command will allow it to view a file as it grows.


2

Your error message is caused by sudo being owned by deployer, in addition, the rights are set incorrectly. To fix the permissions, try something like chmod 4755 /usr/bin/sudo, as you own sudo currently. To fix the ownership, you need to run chown root:root /usr/bin/sudo ...but you might need to be root for that. Unless you have +s set on /bin/chown, and ...


2

There seems to be more than one issue: 1. Bug #1276348 ssh-agent is missing in backintime-kde in versions <= 1.0.34. Please install this patch with sudo patch /usr/bin/backintime-kde4 < backintime-kde4.diff 2. sudo vs. kdesudo sudo doesn't change $HOME but kdesudo does. $ sudo env | grep ^HOME HOME=/home/germar $ kdesudo env | grep ^HOME ...


1

It's very disappointing to me that I can ask a question (with such a simple solution) on a forum with a huge community base and get no answers. In hopes that someone else needing answers will come across this post, I'm telling you all how I came about my solution. The init.d scripts combined with update-rc.d were unsuccessful in rendering my desired system ...


-1

Make sure that 'UsePAM yes' is not disabled in /etc/ssh/sshd_config. Restart the SSH service.


0

I dig into this issue and tried to find out the solution. I ended up with no results and its like a dead end. Only thing I can do is Shutdown the server. Reinstall the complete system and replicated my previous server environment.


0

There seem to be 3 issues resulting in this behavior (for my system Ubuntu 14.04LTS): 1- ssh unknown job occurs when you try to use 'service ssh start' from a 'su' session. Solution is to use sudo service start from a logged in user that can 'sudo' 2- The existing init.d/ssh script is exiting quietly without actually starting sshd when ssh is on upstart ...


0

Maybe the key for your user has had some permission changes, so do check the permission on your ~/.ssh folder. It should have the user's access in order to ssh into another machine. It has the public and private keys. cd ~/ ls -all | grep .ssh And post the results obtained here, so we could take a look at the permissions. Also please post the errors, ...


0

ssh-add adds to the keys to SSH agent for authentication in connections opened from the server, not for connections to the server. So you'll have to do: cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys Further, the permission on ~/.ssh/id_rsa.pub need not be 600, since it is the public key. It can be 644 without loss of security.


0

Save the following in a file named "toggleSsh.sh" #!/bin/bash stat=`status ssh` echo $stat #stat is returned like: ssh start/running, process 1602 goal=`echo $stat|cut -f2 -d" "|cut -f1 -d/` #cut the 2nd field afetr 1st space; then cut the 1st field before "/" to get the "goal" of the ssh job. #ignoring the status echo $goal if [ "$goal" == "start" ]; ...


0

Here is a small shell script, #!/bin/bash if `service ssh status | grep -q running` then service ssh stop echo "ssh stopped by user" else service ssh start echo "ssh started by user" fi After saving it as script.sh, run it as, (give it execution permission) sudo ./script.sh or without execution permission sudo bash ./script.sh


0

Specifically for Firefox, there are add-ons that should be able to help you, e.g., firetitle. Install and configure it on the remote machine.


0

You can use one of the following commands instead: Restarts the service and then exits: ssh user@iphost 'service asterisk restart; exit' Restarts the service and then exits on success: ssh root@iphost 'service asterisk restart && exit'


0

You could just background it as soon as it runs: ssh user@iphost 'service asterisk restart &' I've got a similar issue with an xinit-based upstart service that hogs the stage and needs manually exiting (doesn't harm the Upstart job), but yeah, wang a & on the end and that should force it into the background. If that gives you gyp, there are a ...


0

Try using "here document" ssh user@iphos << endexe service asterisk restart exit endexe That should work.


0

Try redirecting stdin, stdout, and stderr to /dev/null. For an explanation, see http://serverfault.com/questions/36419/using-ssh-to-remotely-start-a-process.


1

By default, the SSH server denies password-based login for root. In /etc/ssh/sshd_config, change: PermitRootLogin without-password to PermitRootLogin yes And restart SSH: sudo service ssh restart Or, you can use SSH keys. If you don't have one, create one using ssh-keygen (stick to the default for the key, and skip the password if you feel like ...


5

You can make an unattended install medium that installs openssh-server, as explained in the other answers: By @Jay _silly_evarlast_ Wren: How can I install Ubuntu on a device without a screen nor a keyboard? & By @Takkat: How can I install Ubuntu on a device without a screen nor a keyboard? You will able to login after installation has been ...


0

[I assume you're using BASH as your login shell. If not, adjust appropriately...] In ~/.ssh/authorized_keys, prepend a command specification to each line like this: command="ssh_key=XXX /bin/bash -l" ssh-dss AAAA...K3E= me@mymachine In ~/.bash-profile, put the following trap at the top: if [ "${ssh_key}" != "XXX" ]; then echo "${SSH_CLIENT}" | mailx ...


0

sshpass only works if the password prompt ends in assword:. If your password prompt is different you may have to adjust the sourcecode of sshpass to recognize the prompt you have. I have seen password prompts like Password for user@host: on some systems, maybe this is your problem.


0

You are able to specify which users that have access the server by configuring the /etc/ssh/sshd_config: AllowUsers admin bob You can list all users by hand or extract them by creating a start up script.


0

One way would be to run a command in the bashrc for SSH connections: In /etc/bash.bashrc (for system-wide) or ~/.bashrc (for your user only), append these lines: if [[ -n $SSH_TTY ]] then # Do stuff to get the output. echo "Hi, SSH user $USER!" fi I don't know how to edit the last login message, but you can disable it and simulate it by using the ...


0

You don't seem to have a running ssh server. If this is a fresh installation, it is likely that none is installed. Install an ssh server. sudo apt-get install openssh-server If the server is already installed, start it: sudo service ssh start You should now be able to log in normally.


0

I am working on Geofront project. I believe it could help you. Geofront is a simple SSH key management server. It helps to maintain servers to SSH, and authorized_keys list for them. Read the docs for more details. Situations If the team maintains authorized_keys list of all servers owned by the team: When someone joins or ...


0

edit: I misunderstood your question (before your edits). Your target system seems to be set up without execute rights for all on the /bin/* content. That is either intentional, or a configuration error. ls -al /bin (as root) should show you if that is the case. For example, on my system, I get: ls -al /bin/ls -rwxr-xr-x 1 root root 110080 Mar 24 15:35 ...


1

Bug confirmed in 14.04 see https://bugs.launchpad.net/bugs/1332753 Installed from git repo to have rsnapshot working in 14.04 e.g. sudo apt-get remove rsnapshot git clone https://github.com/DrHyde/rsnapshot ./configure --sysconfdir=/etc sudo make test sudo make install sudo cp /etc/rsnapshot.conf.default /etc/rsnapshot.conf Rsnapshot will now ...


1

For ssh you can use ~/.ssh/config and configure shorthand access to host like this: Host example.hostname HostName 127.0.0.1 User user Port 2222 If you have bash completion then it would be sufficient to type ssh ex<Tab> to auto-complete to ssh example.hostname and by running this command your ssh will try to connect to host specified in HostName ...


1

The file you're looking for is /etc/hosts.


2

Has the target system been reinstalled recently? This happens because your system recorded the host key of the old target system, but now the host key has changed, probably due to a reinstallation of the system. To make your system forget the old key of the target system, do ssh-keygen -R 192.2.1.151.


1

I like Robie Basaks answer. You might want to checkout the FreeOTP app from RedHat instead of using Google Authenticator. Sometimes when updating the app, they lock you out! ;-) If you want to use other hardware tokens like a Yubikey or an eToken PASS or NG or if you have many users or many servers, you might want to use an opensource two factor ...


0

Are you certain that your connection is definitely reaching the target server, and you're not attempting to get a shell on the host machine by mistake? I'd suggest using a combination of tcpdump and log inspection on the target server (once logged in internally) to confirm that your login attempts are being received correctly. On the target host, you can ...


1

While -p is the valid option to specify the port to connect to the ssh command, it is not for the scp command. The -P (capital P) is the parameter to specify the port to connect to the scp command. The -p parameter (with any value after it) is used to ask scp to preserve modification times, access times, and modes from the original file. Like the -p option ...


2

(Using Ubuntu 13.10)   Click on the "System Settings" icon.   Then click on "User Accounts".   Your administrator account should be displayed.   Click on the "Unlock" button.   Enter your user password as requested to allow changes to your account.   Once unlocked, you can click on your old User name that you wish to change and ...


1

This might sound silly to you, but have you checked all the dpkg.log.* files? Some will be gzipped, you can grep them using zgrep or scroll through them using zless. I don't know for sure, but I think sometimes you might stumble over weird dependencies, so maybe you removed some package that happened to trigger openssh-servers removal? Did you do anything ...


0

Are you declaring a user? ssh Jimmy@65.76.97.222 -p51555 If you gave the code the way you are using it then I believe that it will default to the current user name. Furthermore, you need to have a user on the TARGET system with permission. in the above example "Jimmy"


0

Need to check that port forwarding is working correctly i usually check by going to https://www.grc.com/shieldsup > Proceed > put your port number in the box and click user specified custom port probe. That should tell you if that TCP port is in fact open to public


0

There are some alternative programs, similar to WinSCP (probably) - for example gFTP and FileZilla: You can install both by running: sudo apt-get install gftp filezilla The GUI for Nautilus's servers does not have many options, but you should be able to edit the entries by running: gedit ~/.config/nautilus/servers


1

The who command, as you've already figured out, outputs user information. If I type in who in my Terminal right now I get the following: viktor :0 2014-07-02 15:41 (:0) viktor pts/0 2014-07-03 02:07 (:0) Now, in both these cases I'm logged in as viktor. The first one is my default desktop, Ubuntu itself, the current logged in user in ...


1

To install/configure SSH you should check out one of many guides you can find browsing the internet, this one for example. You can connect to your viritual machiene via SSH using the following command: ssh user@ip You will thereafter be prompted to enter your password. To be able to connect you need, as said, an IP. When connecting locally you have a ...


2

Um, I think you'll find that your server is triggering a message of the day update upon an established ssh connection. You can run the scripts in /etc/update-motd.d and see which is running slowly and deal with the slow script however you wish. Or you can disable this automatic updating by commenting out the following lines in the /etc/pam.d/sshd file ...


0

This issue is fixed if we put a hack. I found it while searching for this problem and it actually worked. But seriously would never advice to use this in production. The get around this issue follow the following steps: First check if you can log into each of the MAAS child nodes using password less ssh. Create directory /var/lib/juju Change the ...


5

ssh-add is the client part of ssh-agent, it has nothing to do with granting access to hosts (which is done by adding the public key (.pub) to ~/.ssh/authorized_hosts on the server side). ssh-agent is a program which you use on the client side, the server side only needs sshd. By invoking ssh-add -d, you have cleared a cached key from ssh-agent such that you ...


0

You can either copy the contents of .ssh/id_rsa.pub (which is your public key) and add it to the end of .ssh/authorized_keys or use ssh-copy-id localhost to let SSH do the copying. Note that your key doesn't need to be in .ssh/authorized_keys unless you plan on SSH'ing into that computer using that key.


1

Found this post as I just happen to have had the same symptoms. Maybe you have after all the same problem then. When bootstrapping Juju I got the same ssh login attempt displayed as you. Then I had a look at my virt-manager and noticed that the machine was not start. I then tried to start the machine by using MAAS GUI. Although, within the MAAS GUI, it ...


0

Looks like Juju is unable to resolve the nodes' names. You need to make sure the system where you run Juju uses MAAS' DNS server as its resolver (check that it works by running host <name of my MAAS node> on the server where you want to run Juju).


0

By default sshd logs to the system logs, with log level INFO and syslog facility AUTH. So the place to look for log data from sshd is in /var/log/auth.log These defaults can be overridden using the SyslogFacility and LogLevel directives. Below is a typical server startup entry in the authorization log. In most cases the default level of logging is fine. ...


1

Yes. 5GB is considered the minimum. I think you could probably get away with even less. It wouldn't allow you to start the installation if you didn't have enough space.


1

Logging in with a root user via ssh is disabled by default. You can login with non-root user and then run su or sudo to run commands with root privileges. Take a look at this link which explains how to enable root logins if that is something you want. The page itself is tailored for red hat but you shouldn't have any problems getting the same solution to ...


2

Simply adding a password for root is not enough for Ubuntu 14.04 Server. You need to edit /etc/ssh/sshd_config, and commend out the following line: PermitRootLogin without-password Just below it, add the following line: PermitRootLogin yes Then restart SSH: service ssh restart



Top 50 recent answers are included