cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
12163
Views
20
Helpful
5
Replies

How to download a report file by SCP from Prime Infraestructure 2.2

Dago_O
Level 1
Level 1

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.imagen.png

 

I can ssh as admin user and list files, though

imagen.png

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.

2 Accepted Solutions

Accepted Solutions

Bill Longman
Cisco Employee
Cisco Employee

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.

View solution in original post

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.

View solution in original post

5 Replies 5

Bill Longman
Cisco Employee
Cisco Employee

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.

Hi @Bill Longman ...

  1. Is there documentation for this procedure? 
  2. Do I have to mount NFS share from root shell?
  3. How would be the foldert path to set it in report configuration?

 

You also say that SCP should work, so how do I avoid the TTY error?

 

Thanks

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.

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.

Thank you so much! spent hours trying to solve this. Very poor documentation on cisco's part. They should be ashamed of themselves.

Review Cisco Networking for a $25 gift card