Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 6 years ago.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Improve this question
I want to use scp command to copy a local file to remote server, but I get an error message after input the password of user in remote server.
~]$ scp gitadmin.pub git#123.150.207.18:
git#123.150.207.18's password:
bash: scp: command not found
lost connection
I checked on server using the git user and it seems the scp command can be found and openssh-clinets were installed too.
git#... ~]$ scp
usage: scp [-1246BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file]
[-l limit] [-o ssh_option] [-P port] [-S program]
[[user#]host1:]file1 ... [[user#]host2:]file2
git#... ~]$ su root
......
root#... ~]# yum info openssh-clients
Loaded plugins: product-id, subscription-manager
Updating Red Hat repositories.
Installed Packages
Name : openssh-clients
Arch : x86_64
Version : 5.3p1
Release : 52.el6
Size : 1.0 M
Repo : installed
From repo : anaconda-RedHatEnterpriseLinux-201105101844.x86_64
Summary : An open source SSH client applications
URL : http://www.openssh.com/portable.html
License : BSD
Description : OpenSSH is a free version of SSH (Secure SHell), a program for
: logging into and executing commands on a remote machine. This
: package includes the clients necessary to make encrypted
: connections to SSH servers.
I'm confused for the situation. Did I missing some configuration on server? (We are using RHEL6 as server.)
It's my fault in path setting.
I added 'custom.sh' in /etc/profile.d and added following lines in it to add /usr/local/node/bin directory to PATH.
export PATH="/usr/local/node/bin:$PATH"
But the format is wrong. I removed the pair of '"' and it works OK now. It should be:
export PATH=$PATH:/usr/local/node/bin
A probe mistake...^_^
Make sure the scp command is available on both sides - both on the client and on the server.
If this is Fedora or Red Hat Enterprise Linux and clones (CentOS), make sure this package is installed:
yum -y install openssh-clients
If you work with Debian or Ubuntu and clones, install this package:
apt-get install openssh-client
Again, you need to do this both on the server and the client, otherwise you can encounter "weird" error messages on your client: scp: command not found or similar although you have it locally. This already confused thousands of people, I guess :)
Issue is with remote server, can you login to the remote server and check if "scp" works
probable causes:
- scp is not in path
- openssh client not installed correctly
for more details http://www.linuxquestions.org/questions/linux-newbie-8/bash-scp-command-not-found-920513/
Check if scp is installed or not on from where you want want to copy
check using which scp
If it's already installed, it will print you a path like /usr/bin/scp
Else, install scp using:
yum -y install openssh-clients
Then copy command
scp -r root#192.168.1.1:/var/www/html/database_backup/restore_fullbackup/backup_20140308-023002.sql /var/www/html/db_bkp/
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 12 months ago.
Improve this question
I'm attempting to start docker and postgresql automatically with my ubuntu wsl2 instance. I read about the /etc/wsl.conf configuration file and it only starts one service, not two. For example if I have:
[boot]
command = service docker start
and restart wsl.. I get the following:
mryan ~ $service docker status
* Docker is not running
mryan ~ $service postgresql status
12/main (port 5432): online
Again, if I remove the last line from etc/wsl.conf and restart wsl. Docker starts just fine. I've also tried quotes around the commands as in command="service docker start" but it didn't make a difference. Is there some format error I'm making here? Any help would be appreciated. I can get around this by manually starting services but it would be nice to make things work properly!
Try combining the commands into a single line maybe, with &&.
One still can start it on demand, eg. with .bashrc or .zshrc:
RUNNING=`ps aux | grep dockerd | grep -v grep`
if [ -z "$RUNNING" ]; then
sudo dockerd > /dev/null 2>&1 &
disown
fi
This may require group docker:
sudo usermod -a -G docker $USER
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
The community reviewed whether to reopen this question 14 days ago and left it closed:
Original close reason(s) were not resolved
Improve this question
I am having a problem while trying to completely purge Maria DB and install it again.
This is what I do to remove it :
2073 sudo apt-get remove --purge maria*
2074 rm -f /var/log/mariadb
2075 rm -f /var/log/mariadb/mariadb.log
2076 rm -rf /var/lib/mysql
2077 rm -rf /usr/lib64/mysql
2078 rm -rf /usr/share/mysql
And then I attempt to reinstall as :
sudo apt install mariadb-server
mysql_secure_installation
But the problem is once I do it I am being prompted for the root password, which should not be set as I have supposedly purged everything.
Output from mysql_secure_installation :
[~]#Ubuntu1804 #> mysql_secure_installation
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
In order to log into MariaDB to secure it, we'll need the current
password for the root user. If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.
Enter current password for root (enter for none):
ERROR 1698 (28000): Access denied for user 'root'#'localhost'
Enter current password for root (enter for none):
ERROR 1698 (28000): Access denied for user 'root'#'localhost'
Enter current password for root (enter for none):
Aborting!
If I leave it blank it fails, but If I try with the right password it fails as well.
How can I remove everything related to MariaDB from the server?
Just run this command
sudo apt-get purge mariadb-*
So in my case, I ended up going to /etc and removing the folder called mysql. It looks obvious but I thought that it would be done automatically when removing? the app via the package manager.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
I want to uninstall Odoo 9 and reinstall in my linux system. Can anyone please help me?
Just follow these steps
service odoo-server stop
Remove config file(s)
rm -f /etc/odoo-server.conf
rm -f /etc/odoo.conf
Remove application code
rm -R /opt/odoo
Remove startup process
update-rc.d -f odoo-server remove
rm -f /etc/init.d/odoo-server
Remove logs
rm -R /var/log/odoo
Remove databases
sudo service postgresql stop
apt-get remove postgresql -y
apt-get --purge remove postgresql\* -y
rm -r -f /etc/postgresql/
rm -r -f /etc/postgresql-common/
rm -r -f /var/lib/postgresql/
Delete users and groups
userdel -r postgres
groupdel postgres
To Remove postgre
find the file pg_hba.conf - it may be located, for example in /etc/postgresql-9.1/pg_hba.conf.
cd /etc/postgresql-9.1/
Back it up
cp pg_hba.conf pg_hba.conf-backup
place the following line (as either the first uncommented line, or as the only one):
local all all trust
restart your PostgreSQL server (e.g., on Linux:)
sudo /etc/init.d/postgresql restart
you can now connect as any user. Connect as the superuser postgres (note, the superuser name may be different in your installation. In some systems it is called pgsql, for example.)
psql -U postgres
Reset password
ALTER USER my_user_name with password 'my_secure_password';
Restore the old pg_hba.conf as it is very dangerous to keep around
cp pg_hba.conf-backup pg_hba.conf
restart the server, in order to run with the safe pg_hba.conf
sudo /etc/init.d/postgresql restart
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
Have work on CentOS release 6.3 (Final) system. And try to ssh another machine using sshpass utility like
sshpass -p 'password' ssh user#host
But it give me error like
sshpass: Failed to run command: No such file or directory
So from error i think that sshpass may be not install so have try to install it by yum install sshpass and get following log
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: mirror.leapswitch.com
* epel: epel.mirror.net.in
* extras: mirror.leapswitch.com
* nux-libreoffice.org-rpms: mirror.li.nux.ro
* updates: mirror.leapswitch.com
Setting up Install Process
Package sshpass-1.05-1.el6.i686 already installed and latest version
Nothing to do
from above it seems sshpass is already installed.So why it not working?
Check if your shell knows the locations of sshpass
which sshpass
If it doesnt give any output use find command to find the location of the executable:
find / -name sshpass
If you find the path, you can either use the full path of the executable:
/path/to/sshnpass
Or add the path to the PATH environmental variable, so that your shell can locate it:
export PATH=$PATH:/path/to/
Or the issue might be completely different. sshpass might not be able to find some other dependency. "ssh" client might not be installed. Or your syntax might be wrong:
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 12 years ago.
Improve this question
Trying to update some repositories on Debian Etch installation and getting the following errors from running "apt-get update"
W: GPG error: http://www.debian-multimedia.org etch Release: The following signatures couldn't be verified because teh public key is not available: NO_PUBKEY 07DC563D1F41B907
W: You may want to run apt-get update to correct these problems
The irony of it instructing me to run apt-get update is a nice kicker...
I found several posts telling me to run several gpg commands, but they didn't solve the problem because of two things. First, I was missing the debian-keyring package on my system and second I was using an invalid keyserver. Try different keyservers if you're getting timeouts!
Thus, the way I fixed it was:
apt-get install debian-keyring
gpg --keyserver pgp.mit.edu --recv-keys 1F41B907
gpg --armor --export 1F41B907 | apt-key add -
Then running a new "apt-get update" worked flawlessly!
I had the same problem of "gpg: keyserver timed out" with a couple of different servers. Finally, it turned out that I didn't need to do that manually at all. On a Debian system, the simple solution which fixed it was just (as root or precede with sudo):
aptitude install debian-archive-keyring
In case it is some other keyring you need, check out
apt-cache search keyring | grep debian
My squeeze system shows all these:
debian-archive-keyring - GnuPG archive keys of the Debian archive
debian-edu-archive-keyring - GnuPG archive keys of the Debian Edu archive
debian-keyring - GnuPG keys of Debian Developers
debian-ports-archive-keyring - GnuPG archive keys of the debian-ports archive
emdebian-archive-keyring - GnuPG archive keys for the emdebian repository