11-07-2017 11:37 AM - edited 03-01-2019 06:14 PM
Hi Cisco Community,
I have this Cisco Prime 2.2 report scheduled daily and saved to /localdisk/ftp/reports/ClientSessions/ as an CSV file. What I need is to copy this file to a remote repository (linux machine) using SCP. In this case PI 2.2 would be the ssh server and the remote repository, the client.
The problem is when I try to get the file I get this error.
I can ssh as admin user and list files, though
I know that the "Error getting tty" is related when a user doesn't have a shell assigned, at least that is the case for linux, but don't know how to assign it to a Prime user or create a user enabled to do this. I have browsed documentation, but haven't find an answer.
Any idea on how to solve this? Or if it's possible at all?
Thanks in advance.
Solved! Go to Solution.
11-07-2017 01:30 PM
The supported method to do this is to create an NFS share and let the reports get saved into the share.
You can use SCP, too, but it cannot be automated.
11-16-2017 05:12 AM
So, here is the solution.
In order to SCP to cisco Prime, firt you must get credentials for "scpuser" executing this script /opt/CSCOlumos/bin/getSCPcredentials.sh from linux shell. Once you get those credential one can SCP as always, in my case:
scp scpuser@piserver:/localdisk/ftp/reports/ClientSessions/Conexiones_de_*.csv /your/local/repo
And use password given by getSCPcredentials.sh. In addition one can create a ~admin/.ssh directory and add authorized_keys to speed up logging in.
11-07-2017 01:30 PM
The supported method to do this is to create an NFS share and let the reports get saved into the share.
You can use SCP, too, but it cannot be automated.
11-08-2017 04:17 AM
Hi @Bill Longman ...
You also say that SCP should work, so how do I avoid the TTY error?
Thanks
11-16-2017 05:12 AM
So, here is the solution.
In order to SCP to cisco Prime, firt you must get credentials for "scpuser" executing this script /opt/CSCOlumos/bin/getSCPcredentials.sh from linux shell. Once you get those credential one can SCP as always, in my case:
scp scpuser@piserver:/localdisk/ftp/reports/ClientSessions/Conexiones_de_*.csv /your/local/repo
And use password given by getSCPcredentials.sh. In addition one can create a ~admin/.ssh directory and add authorized_keys to speed up logging in.
03-01-2021 01:08 AM
Hello team,
I know this is an old post but maybe someone has been in this situation.
I have an external script to move scheduled reports to a repository.
The script works fine but I have this problem.
When I trigger this script (once a month) I have to recheck the password. I mean, I have to rerun ./getSCPCredentials.sh and get the new password.
I have noticed this password is not the same.
Does anybody know how to keep the password or why/when does it change?
If I run the script a few times always outputs the same password, but it has to be a day when it changes and can't understand why.
10-26-2021 08:07 AM
Thank you so much! spent hours trying to solve this. Very poor documentation on cisco's part. They should be ashamed of themselves.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide